Home › Forums › Calendar Products › Events Calendar PRO › List upcoming events until the event end time
- This topic has 23 replies, 4 voices, and was last updated 11 years, 11 months ago by Rob.
-
AuthorPosts
-
May 12, 2012 at 8:22 am #19078KellyParticipant
I’m currently using tribe_get_events with eventDisplay = upcoming to display upcoming events on the home page. It displays all events for the current day, is there a way to modify the query to display events only until the event endtime? Thanks for your help!
May 14, 2012 at 7:53 am #19126RobMemberHi there Kelly. Thanks for reaching out, and for your use of the plugin. While I’m not sure about this one myself I have asked our dev Jonah to take a look and respond directly when he hits the forums later this morning. Stay tuned!
May 15, 2012 at 5:38 am #19180HenryMember‘upcoming’ shouldn’t display past events so after the event end time has been hit then event should drop out of the list. Are you specifically setting the end time for each event or are you marking the events as ‘all day events’? I am assuming all day events would drop out of the list at midnight?
May 15, 2012 at 9:14 am #19189KellyParticipantHi Henry. The events are recurring events with an end time, not all day events. I did upgrade from a previous version, not sure if it would have any impact or not.
May 15, 2012 at 11:01 am #19192JonahParticipantHi Kelly,
Have you tried passing in the start_date/end_date as shown in the second example for tribe_get_events in our doco: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events
That should get you what you need but let me know if you need any other help.
Cheers,
JonahMay 15, 2012 at 11:49 am #19197KellyParticipantHi Jonah, thanks for your response. Modified the query to have start_date=>$now with $now = date(“Y-m-d G:i:s”), which produces the same results. It seems no different than using eventdisplay=>upcoming, the time is ignored. Basically I’m trying to display the next 5 upcoming events, with events falling off the list when the endtime passes.
May 16, 2012 at 12:24 pm #19271JonahParticipantHi Kelly, can you please post your full code so I can try it out and adjust as needed. Please post the code @ http://pastebin.com / http://pastie.org or http://gist.github.com
Thanks,
JonahMay 17, 2012 at 8:23 am #19310KellyParticipantHi Jonah,
code using upcoming… git://gist.github.com/2719600.git
code using startdate… git://gist.github.com/2719613.git
Thanks for your help!May 17, 2012 at 12:04 pm #19324JonahParticipantHi Kelly, you had some syntax errors in the PHP so I’ve corrected those and the queries are working ok for me. Take a look at my comments on Github and try the queries again.
Cheers,
JonahMay 17, 2012 at 1:11 pm #19330KellyParticipantHi Jonah, I really appreciate you looking at the code. I did not see a difference between our code except for the removal of an extra php opening/closing tag and spacing. I did paste your code into the site and I get the same result. http://aksaintandrews.org/ Any other ideas would be greatly appreciated.
May 20, 2012 at 7:56 pm #19429KellyParticipantCould it be because these are recurring events? Modified the query to use start and end dates as follows…
'start_date' = date ("Y-m-d G:i:s") ;
'end_date' = date ("Y-m-d G:i:s", strtotime ('+1 hour')) ;
The result is still the same. When reviewing the entry in the database saw only the initial event has an end date, all the other event dates had a start date but no specified end date.May 21, 2012 at 10:55 am #19454JonahParticipantHi Kelly,
I guess I don’t fully understand what you’re trying to do… Are you trying to query the next 5 events and that’s it?
May 21, 2012 at 11:36 am #19466KellyParticipantHi Jonah, Yes, trying to query the next 5 upcoming events.
May 21, 2012 at 1:17 pm #19473JonahParticipantWell, your query does get the next 5 upcoming events so I’m still not sure what the problem is… Care to elaborate?
May 21, 2012 at 1:28 pm #19474KellyParticipantIt seems like it should, but on the site it does not… http://aksaintandrews.org/ it displays everything for that day. I’ve been using the calendar for a while now and have upgraded it to the latest version (to version 2 from 1 something), before the update I was able to display the upcoming events. Since the query is right, purhapse it is something with the upgraded event entries?
-
AuthorPosts
- The topic ‘List upcoming events until the event end time’ is closed to new replies.