Home › Forums › Calendar Products › Events Calendar PRO › tribe_get_events showing repeated start date
- This topic has 4 replies, 3 voices, and was last updated 12 years, 1 month ago by
Leah.
-
AuthorPosts
-
March 12, 2014 at 12:38 pm #117978
sunvalleycenter
ParticipantWe 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.March 12, 2014 at 5:09 pm #118058Barry
MemberI 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?
March 13, 2014 at 10:11 am #118315sunvalleycenter
ParticipantThanks 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!March 13, 2014 at 10:27 am #118338sunvalleycenter
ParticipantOh 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!
March 13, 2014 at 2:12 pm #118484Leah
MemberGlad you got things squared away sunvalleycenter! Thanks for letting us know 🙂
~Leah
-
AuthorPosts
- The topic ‘tribe_get_events showing repeated start date’ is closed to new replies.
