Showing all past events

Home Forums Calendar Products Events Calendar PRO Showing all past events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1315758
    Nick
    Participant

    Hi

    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_Query to create this functionality. However, the Events Calendar plugin hijacks/extends the parse_query() function for ALL query requests related the tribe_events post_type and adds a WHERE clause 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 the tribe_events post_type without any interference from the plugin?
    Or is there a way to provide an additional parameter in the $query associative array object that is used to initialise WP_Query that will allow the loading of past events without the need of a query string parameter?

    #1316132
    Shelby
    Participant

    Hi 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 🙂

     

    #1321160
    Nick
    Participant

    Hi 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
    Martin

    #1322418
    Shelby
    Participant

    Hi 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

    #1332268
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Showing all past events’ is closed to new replies.