Retrieve non-expired events

Home Forums Calendar Products Events Calendar PRO Retrieve non-expired events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #936724
    papertower
    Participant

    Greetings!

    I’m trying to find the best way to retrieve all the events that aren’t expired. I found the tribe_get_events function, but it doesn’t do anything get_posts doesn’t aside from setting the post type. I could do a meta_query on _EventStartDate, but I only know that from looking in the database. I’d really prefer your plugin doing that in the case you decide to change the meta key any time down the road.

    Now.. I have to be honest. My team and I use The Events Calendar on various projects when an event system is needed. As a drag-n-drop plugin, it works pretty well. But as a developer, I always dread working with it. If all we want to do is drop it in place, select which features to use, and style it to our needs, it works fine. But anything outside of that, and it’s incredibly frustrating. Why do the technical docs show deprecated functions for the first 8 or so pages? It takes less time to just go through your code and find stuff that way. The plugin feels like it hugely caters to the non-developer crowd, giving us devs the short end of the stick. Sorry for the frustration, but I’ve worked with this plugin on many projects now and inevitably feel this way.

    Thanks so much for your time!

    ~Jason

    #936773
    Brian
    Member

    Hi Jason,

    Sorry for the frustrations I totally get that as both a developer myself and someone that supports the Events Calendar.

    First to answer you question.

    If you use this in your query:

    eventDisplay

    You can set the value to:

    list

    So something like this:

    'eventDisplay' => 'list'

    That will show only upcoming events.

    It is also takes all and past too.

    We have this document that gives some examples as well:

    Using tribe_get_events

    Technical Documents
    I get your point about the technical documents. Showing so many deprecated functions, that is not very useful at all. I will bring up about filtering those out to make that more useful.

    We are also working on upgrading all our technical documents now they we have the new site up and feedback such as yours is helpful for us to improve them. So I will bring it up with the team and seeing about getting it improved.

    Let me know if you have any follow up questions.

    Thanks

    #938798
    papertower
    Participant

    Got it. I see what that does in tribe-event-query-class.php. Thanks!

    I’m having an issue now wherein, in the events, I only want the first event for recurring events.

    #938805
    Brian
    Member

    Is this related to the previous posts?

    I’m having an issue now wherein, in the events, I only want the first event for recurring events.

    Not sure what context you are referring to.

    Let me know and I can try to help out.

    Thanks

    #943679
    Brian
    Member

    I am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Retrieve non-expired events’ is closed to new replies.