Date Comparison

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

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

« Back to Code Samples