Plugin Author
Barry
(@barryhughes-1)
Can you provide any more detail/context?
Thread Starter
app17
(@app17)
Hi Barry! Hope the below is more useful! Let me know if you need more information.
I have a functions.php in my theme for custom code. It includes a pre_get_posts filter which modifies the main WP query (in this case the one that returns tribe_events).
It’s doing a few things e.g. ignoring the time component of upcoming events so all events are displayed for the whole of today.
if ( $query->query_vars[‘eventDisplay’] == ‘upcoming’ ) {
$query->set(‘start_date’, Date(‘Y-m-d’));
}
If I visit “mywebsite.com/events” my pre_get_posts filter is used and events are displayed as I expect. When I visit “mywebsite.com” (when using the Event Rocket plugin) I’m currently only seeing one event.
I can see in the nosecone code that it uses the parse_query filter. Should I try and hook into this as well to make sure that my pre_get_posts filter params are being used too?
Thanks!
Plugin Author
Barry
(@barryhughes-1)
Ahh, yes I think I see what you mean.
You’re probably right and what EventRocketNosecone::parse_query() does may be impacting on the logic in your own code. As of the very latest release (1.4) you can probably change your logic to additionally test for the presence of an eventrocket_frontpage query variable, something like:
if ( $query->query_vars['eventDisplay'] == 'upcoming' || $query->get( 'eventrocket_frontpage' ) ) {
/* Your logic */
}
Might that help?
Thread Starter
app17
(@app17)
Hi again Barry,
I just installed the latest version and everything is where it should be.
Thanks for persevering with me!
B.
Plugin Author
Barry
(@barryhughes-1)
Awesome – thanks for letting me know 🙂