Yeah, so the reason it wasn’t working is your overriding the global $wp_query which should at that point be the main query with the Event list query and then using it as a custom/secondary loop.
wp_reset_postdata(); resets the $post object back to the main query’s post but as you’ve not overwritten that, it doesn’t work 🙂
wp_reset_query() likely would have worked but you shouldn’t need to do that and should be using a custom variable as above.
So then when you reset above your resting the $post object, but $wp_query was still the ‘wrong’ query.
Anyway, just a quick explanation on what I think was happening, I’m glad the above worked for you 🙂
Viewing 3 reply threads
The support post ‘Page breaking after event query’ 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.
If you would like help from the Event Espresso staff, then please purchase a support license right now so you can create a support topic in our premium support forums.