It works fine, but it still displays events that are expired. I’ve also using the EE Query which then doesn’t display the expired events, but then I can’t use ‘post__not_in’ to not display the current post. Any thoughts?
I don’t see anywhere in your code that tells the query to exclude expired events. Here’s a link to some example code that shows how to use the WordPress posts_join and posts_where filter hooks to exclude expired events:
The support post ‘Custom WP Query for events is displaying expired events.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.