List upcoming events until the event end time

Home Forums Calendar Products Events Calendar PRO List upcoming events until the event end time

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #19078
    Kelly
    Participant

    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!

    #19126
    Rob
    Member

    Hi 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!

    #19180
    Henry
    Member

    ‘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?

    #19189
    Kelly
    Participant

    Hi 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.

    #19192
    Jonah
    Participant

    Hi 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,
    Jonah

    #19197
    Kelly
    Participant

    Hi 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.

    #19271
    Jonah
    Participant

    Hi 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,
    Jonah

    #19310
    Kelly
    Participant

    Hi Jonah,
    code using upcoming… git://gist.github.com/2719600.git
    code using startdate… git://gist.github.com/2719613.git
    Thanks for your help!

    #19324
    Jonah
    Participant

    Hi 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,
    Jonah

    #19330
    Kelly
    Participant

    Hi 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.

    #19429
    Kelly
    Participant

    Could 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.

    #19454
    Jonah
    Participant

    Hi 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?

    #19466
    Kelly
    Participant

    Hi Jonah, Yes, trying to query the next 5 upcoming events.

    #19473
    Jonah
    Participant

    Well, your query does get the next 5 upcoming events so I’m still not sure what the problem is… Care to elaborate?

    #19474
    Kelly
    Participant

    It 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?

Viewing 15 posts - 1 through 15 (of 24 total)
  • The topic ‘List upcoming events until the event end time’ is closed to new replies.