Upcoming events via tribe_get_events()?

Home Forums Calendar Products Events Calendar PRO Upcoming events via tribe_get_events()?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #205381
    Marty
    Participant

    I’m converting a ECP 2.x implemention to 3.x.

    In the old version, I’m using sp_get_events() to generate a list of events, and it’s giving me upcoming events only (which is what I want). For the new version, I’m trying tribe_get_events(), but the list it’s giving me begins with the oldest events in my DB. I’ve looked at the docs ( http://docs.tri.be/Events-Calendar/function-tribe_get_events.html ) but they’re pretty sparse.

    Are there parameters I can pass to tribe_get_events() to return upcoming events only? Is there a complete list of the params this function can accept? Or, is there another function I should be using for this? Thanks!

    #206442
    Casey
    Participant

    martyspellerberg,
    Thanks for reaching out! Take a look at these examples of using tribe_get_events in different scenarios, paying special attention to the ‘eventDisplay’=>’upcoming’ parameter.

    Give that a try and let me know if it points you in the right direction. Thanks! 🙂

    After looking at that page, I realized that documentation is for version 2.x. So sorry! I’m diving into the current tribe_get_events() docuemntation and will get you an accurate answer shortly. Thanks! 🙂

    -Casey-

    #206504
    Casey
    Participant

    marty,
    Ok, upon closer inspection, you can still use ‘eventDisplay’ => ‘upcoming’ with tribe_get_events(), so my previous advice should still be valid. Give that a try and let me know if it gets you started in the right direction. Thanks! 🙂

    -Casey-

    #210219
    Marty
    Participant

    Hi, yes, that param did the trick, thanks.

    It’d be great if those params were documented somwhere, though — less time wasted by everyone!

    #211372
    Casey
    Participant

    Marty,
    Thanks for the great feedback here! We’re definitely aware that the documentation on our site is lacking, and are actively working on ways to improve it. So, thanks for being patient with us!

    Since it looks like you’re all set here, I’ll go ahead and mark this thread answered and close it out. Feel free to start a new thread if you have further questions. Thanks! 🙂

    -Casey-

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Upcoming events via tribe_get_events()?’ is closed to new replies.