Home › Forums › Calendar Products › Events Calendar PRO › tribe_get_events for date range
- This topic has 7 replies, 5 voices, and was last updated 10 years, 8 months ago by Leah.
-
AuthorPosts
-
July 30, 2013 at 10:49 am #57811rduncan10Participant
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?July 31, 2013 at 12:14 pm #58093CaseyParticipantRduncan10,
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!August 2, 2013 at 1:49 pm #58563RobMemberHey there rduncan10. Happy to try and help you out here; out of curiosity though, what are you using the “-1” for?
August 3, 2013 at 7:43 am #58663rduncan10ParticipantI 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.August 6, 2013 at 6:54 pm #59208RobMemberAh 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.
August 8, 2013 at 3:57 pm #59585BarryMemberHi 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.
August 10, 2013 at 8:10 am #59834rduncan10ParticipantYou are correct. This appears to be working for me now. Thanks for your help.
August 12, 2013 at 9:23 am #59985LeahMemberAwesome! Thanks rduncan10!
-
AuthorPosts
- The topic ‘tribe_get_events for date range’ is closed to new replies.