tribe_get_events showing repeated start date

Home Forums Calendar Products Events Calendar PRO tribe_get_events showing repeated start date

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #117978
    sunvalleycenter
    Participant

    We are having issues with home page events scrolling (middle box bottom). http://sunvalleycenter.org/
    For example, the Spring Break Art Camp (for both 1st-3rd graders and 4th & 5th grades) does officially starts on March 24 so that seems to be working – but the next three recurring events in the system “Teen Workshop” (which officially starts/runs on April 5-6) and “Workshop: Serious Play” (which officially starts/runs on April 5-6) as well as “Springtime for Improv” (which officially starts runs Mondays April 7-May 15) all show a start date of March 24.

    It’s somehow defaulting to the start date of the very first recurring event on March 24 for them all?

    And the home page calendar scroll stops displaying events after the April 10 event “Eames” which it shouldn’t since there are events through the summer …
    Here is the code for this section: http://pastebin.com/zWZbGKSh
    Can you tell me what I might be doing wrong.

    #118058
    Barry
    Member

    I don’t see any of the events you mentioned there right now, but I think the problem is this: currently, recurring event instances all share a post ID in common. When, as you are, the post ID is explicitly passed to functions like tribe_get_start_date() it essentially assumes you mean the original instance or at least the first instance in the future, depending on the context.

    Instead of explicitly passing the event ID, try setting up the event as the global post object using either the query object’s the_post() method or setup_postdata(), per the instructions in the WordPress codex.

    Does that help at all?

    #118315
    sunvalleycenter
    Participant

    Thanks Barry, I am recoding issues from the past developer so learning as I go… I did what you said and now the dates are working correctly however we don’t get ALL of the upcoming events and there isn’t anything in the code that should limit it. It stops at April 10 (if you scroll through the calendar) and there are events after that date. Am I missing something? Here is code: http://pastebin.com/ZhGqB581
    Thanks for your help!

    #118338
    sunvalleycenter
    Participant

    Oh geez never mind. There was a post that was breaking the rest of the events and once it was removed all the remaining events appeared. Thanks for your help!

    #118484
    Leah
    Member

    Glad you got things squared away sunvalleycenter! Thanks for letting us know 🙂

    ~Leah

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘tribe_get_events showing repeated start date’ is closed to new replies.