tribe_get_events for date range

Home Forums Calendar Products Events Calendar PRO tribe_get_events for date range

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #57811
    rduncan10
    Participant

    I’m trying to use tribe_get_events to get the events for one day. I use:
    $result=tribe_get_events(array(‘start_date’ => ‘2013-09-21’, ‘posts_per_page’ => -1));
    When I run this, it just brings back results from any time period. I think it may just be starting with the earliest even in the calendar. It ignores the start_date.
    Am I doing something wrong?

    #58093
    Casey
    Participant

    Rduncan10,
    Thanks for reaching out! I’m going to go ahead and move this thread over to the EC PRO forum, since this isn’t really Community related. Someone will follow up with you there ASAP. Thanks!

    #58563
    Rob
    Member

    Hey there rduncan10. Happy to try and help you out here; out of curiosity though, what are you using the “-1” for?

    #58663
    rduncan10
    Participant

    I got the -1 from this documentation: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events. I realize that is from an older version. I’ve tried this several ways, with and without the posts_per_page field, with no luck.
    I also tried it with some code you sent me yesterday in response to another query, https://theeventscalendar.com/support/forums/topic/add-something-beforeafter-events-in-event-list-widget/#post-58485, adding “start_date” to that. While the category filter worked, the results showed events with multiple start dates.

    #59208
    Rob
    Member

    Ah gotcha! Thanks for the follow-up. This one has stretched admittedly outside my area of expertise; but I’m going to see if Barry from the team can point you in the right direction here. We also realize our docs on tribe_get_events are sorely lacking and should be beefing up the docs.tri.be entry for it to reflect that as part of our current release. Thanks for your patience on both fronts.

    #59585
    Barry
    Member

    Hi rduncan10: that basically looks good but can you also add an eventDisplay key to your array and set it to all – let me know if that helps.

    #59834
    rduncan10
    Participant

    You are correct. This appears to be working for me now. Thanks for your help.

    #59985
    Leah
    Member

    Awesome! Thanks rduncan10!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘tribe_get_events for date range’ is closed to new replies.