Date Comparison

The code below will query an events post type by comparing the start and end dates.

Note: We are using lessthan in the meta_compare parameter because using the < symbol in a shortcode may cause issues with rendering. This is an undocumented ALM hotfix designed to allow for symbols in shortcodes.


« Back to Code Samples