tribe_events_event_schedule_details showing today's date instead of event date

Home Forums Calendar Products Events Calendar PRO tribe_events_event_schedule_details showing today's date instead of event date

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #955129
    steve
    Participant

    Can someone help me understand why the following code is returning today’s date instead of the event date? I’m using this code in my footer within a tribe_get_events loop

    `echo tribe_events_event_schedule_details($event_id,”,”)

    Thanks.

    #955347
    George
    Participant

    Hey Steve,

    It can be challenging to debug custom code like your custom tribe_get_events() loop, but there are a few things we can start out with to help reveal more information about your issue here. Addressing these items in order is a good place to start:

    1. What version of The Events Calendar is active on your site?

    2. What version of Events Calendar PRO is active on your site?

    3. Does this happen with every single event on your site, or only with one event? Your site is password protected, so I couldn’t view the site to explore it a bit, but just to be 100% certain, do all of your events have different start dates?

    4. If you take the tribe_events_event_schedule_details() call outside of your loop temporarily, and instead of using an $event_id variable, you just manually enter the actual ID of an event you know of, does the date still show incorrectly? An example of this would be tribe_events_event_schedule_details( 123 ), where our hypothetical event has the ID of “123”…

    5. Can you paste your entire custom loop code, un-edited, into a Gist at http://gist.github.com and share a link to that Gist so we can take a glance at your code in full?

    There’s a lot of important ground covered here in these first few items – let us know about each of them and we’ll see what we can learn from there!

    Thanks,
    George

    #956804
    steve
    Participant

    Thanks for looking into this. To answer your questions:

    1. I’m using version 3.9.1 of both the Events Calendar and Events Calendar Pro
    2. The issue happens on all events.
    3. The function works correctly when using it outside of the loop with a specific event id.
    4. Here’s the code – https://gist.github.com/anonymous/53304757ed5b3a67d85b

    #957660
    George
    Participant

    Hi Steve,

    Thanks for addressing each of those items here. I looked at your custom code and noticed that $event_id is not defined anywhere in your code.

    So, how about trying to pass null or get_the_ID() instead of that undefined variable – so, in other words, making that bit of code look like this instead:

    
    echo tribe_events_event_schedule_details( null, '', '' );
    

    Or, if that does not help, like this:

    
    echo tribe_events_event_schedule_details( get_the_ID(), '', '' );
    

    Let us know what you find by trying these alternatives!

    Thanks Steve

    #958206
    steve
    Participant

    Still no luck. Here’s a new Gist with the updated code – https://gist.github.com/anonymous/60f6ced5381783908ef9

    Null doesn’t work either.

    It’s weird because, as you can see in the code, I’m printing out the id and it works fine, printing out the correct unique id of each event.

    Any more idea on what could be going on?

    #958293
    George
    Participant

    Hey Steve,

    Can you clarify what you mean about the code not working now? Is it still showing today’s date, or just not showing…anything?

    We are supposed to keep support for customizations quite limited – I really appreciate your patience with the issue and back-and-forth, by the way! – but I’m curious for some more details regarding what you’re trying to do here.

    That might be helpful, because for example, your code is currently echoing the schedule details function into the Class attribute of the <li> element – is this intentional? Are you trying to make date-specific class names or something here?

    Thanks again for your patience Steve! This function is quite useful and your code is quite workable, so a useful solution can almost certainly be concocted here.

    Cheers,
    George

    #958619
    steve
    Participant

    By code not working I mean it’s doing the same thing, printing today’s date albeit.

    I don’t see any class being printed to my

  • s. They’re empty.

    I’m trying to make a prefooter featured events block showing 3 events on the bottom of each page.

#958942
George
Participant

Hey Steve,

In your last post, you mention this:

I’m trying to make a prefooter featured events block showing 3 events on the bottom of each page.

That’s unfortunately a lot more intensive to build than the stuff mentioned earlier in the thread here, so from here you’ll unfortunately have to take the reins on making this custom events display.

Be sure to check out that Themer’s Guide I mentioned earlier → https://theeventscalendar.com/knowledgebase/themers-guide/

It’s incredibly helpful and those principles should make adding what you want to your site as non-destructive a process as possible.

Thanks,
George

#984119
Support Droid
Keymaster

This topic has not been active for quite some time and will now be closed.

If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘tribe_events_event_schedule_details showing today's date instead of event date’ is closed to new replies.