One of the common requirements in WordPress is being able to filter the events (or could be posts of any post type) to only those that are set to occur in the future via a custom fields plugin like ACF.
Here’s how future events can be shown when using Bricks Builder.
Whether you are using the Posts element or the Query Loop feature, click the query (loop) icon and add a META QUERY like this:

where event_date
is the name (when using ACF)/ID (when using Meta Box) of the date-type of custom field.
Meta value can be set to either
or
The Display and Return Formats for the field do not matter and can be set to any or left at their defaults.
Reference
https://forum.bricksbuilder.io/t/solved-post-loop-meta-query-by-acf-date-field/2309/9?u=sridhar
Robbie
I’m using pods to build a custom event calendar. I’ve set up a query exactly like this but nothing displays when I set to “Greater Than”
If I choose “lesser” the post will show the event with the second closest date in the future. Any ideas what I’m doing wrong?
Sridhar Katakam
Follow https://brickslabs.com/querying-posts-by-date-datetime-custom-fields-in-bricks/.
It was earlier tested with ACF and Meta Box.
I have now tested it with Date type of field created using Pods and it applies to Pods as well.
Christian Strand
Looks like my “timestamp code” actually outputted a php function here on your site
Christian Strand
Hi. Using Metabox and I have my DateTime fields stored as timestamps so I can use the WordPress function to display the date in the correct language based on user. The above doesn’t seem to work if I have “save as timestamp” selected in Metabox datetime field. Are you able to help witha filter that work based on timestamp rather than Ymd? I have tried to use 284802Australia/Melbourne0428pm02+11:00.
Tilen
Perfect, works for Tribe Events Calendar as well! Thank you, I’ve been struggling on this one. ๐
Jay
Can this also be achieved with a custom date field from JetEngine?
Sridhar Katakam
Should work. Give it a try.
I don’t have experience with JE.