Home › Forums › Calendar Products › Events Calendar PRO › Showing all past events
- This topic has 5 replies, 2 voices, and was last updated 8 years, 8 months ago by
Nick.
-
AuthorPosts
-
July 4, 2017 at 1:57 am #1315758
Nick
ParticipantHi
We are using this plugin on the https://ahti.nl/events-2/ using the shortcode
[tribe_events view="photo" tribe-bar="false" date="2017-01"]However, we want to have the Upcoming Events in a block at the top of the page and the Past Events in a block at the bottom of the page.
If we remove the date specifier in the shortcode we end up with a link to past events, but we want the to display on the page.As we are using a page builder for this page, Beaver Builder, I decided to write a custom extension to directly access the Posts table using
WP_Queryto create this functionality. However, the Events Calendar plugin hijacks/extends theparse_query()function for ALL query requests related thetribe_eventspost_type and adds aWHEREclause that prevents the query from retrieving any events in the past. Looking at the code, it expects a querystring parameter to be present before it will load past events.Is there a way to negate or prevent the
parse_query()from being executed so that I can build a custom query to retrieve thetribe_eventspost_type without any interference from the plugin?
Or is there a way to provide an additional parameter in the$queryassociative array object that is used to initialiseWP_Querythat will allow the loading of past events without the need of a query string parameter?July 4, 2017 at 8:52 pm #1316132Shelby
ParticipantHi there Nick,
I’m happy to help here!
I’ll look into your specific questions, but in the meantime, I think you may find Barry’s notes here helpful. Basically, you can specify with our shortcodes in the meantime to display past events. We’re also considering adding this to our development schedule so it may be worth chiming in on our feature suggestion forum as mentioned in the thread by Barry as well.
I’ll let you know once I have more information about your specific questions about preventing the query. 🙂
Best,
Shelby 🙂
July 14, 2017 at 5:37 am #1321160Nick
ParticipantHi Shelby
Do you have any feedback on this? Been 10 days now.
How can we prevent the plugin from hijacking all queries that are related to the tribe_events post type so that I can make custom queries to the same post type in a custom plugin?
That way I can then have my custom plugin render the events grid on this single page.Thanks
MartinJuly 17, 2017 at 7:09 pm #1322418Shelby
ParticipantHi Martin,
Apologies for the delay here. I accidentally marked this incorrectly so it wasn’t showing in my queue properly. That’s totally my bad, and I appreciate your patience!
I think you’ll actually find this article about custom event queries super helpful for what you’re trying to do. Please let me know if you have any additional questions about implementation. 🙂
Best,
Shelby
August 8, 2017 at 9:35 am #1332268Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Showing all past events’ is closed to new replies.
