Home › Forums › Calendar Products › Events Calendar PRO › Event Shouldn't Be Showing in Past Events Yet
- This topic has 9 replies, 4 voices, and was last updated 9 years, 4 months ago by
RANDY.
-
AuthorPosts
-
November 17, 2016 at 8:13 am #1193850
RANDY
ParticipantHi there,
I noticed that an event happening today is currently being archived under “Past Events”. However, this shouldn’t be the case since it is currently ongoing.
Is there a way to change this?
November 17, 2016 at 3:37 pm #1194199RANDY
ParticipantOkay, I got something going now.
$events = tribe_get_events( array( 'posts_per_page' => 2, 'order' => DESC, 'end_date' => date( 'Y-m-d 00:00:00' ), 'eventDisplay' => 'custom' ) );The issue is that this ALMOST works. I still need to get it the last hour, minute, and second as well if I can.
November 17, 2016 at 5:52 pm #1194263Nico
MemberHi there Randy,
Thanks for getting in touch with us! I can help you here but I don’t think I fully understand the issue so let’s begin by clarifying this a bit:
I noticed that an event happening today is currently being archived under “Past Events”. However, this shouldn’t be the case since it is currently ongoing.
Is this happening in a calendar view or in an events query like the one you show in the next reply?
Regarding the code you shared, the date format is not correct. Try the following:
$events = tribe_get_events( array(
'posts_per_page' => 2,
'order' => DESC,
'end_date' => date( 'Y-m-d H:i:s' ),
'eventDisplay' => 'custom'
) );
Please let me know about it,
Best,
NicoNovember 18, 2016 at 8:16 am #1194471RANDY
ParticipantNico,
It’s happening in both.
For example, we have an event today (11/18/16) and it runs from 8AM to 5PM.
It is 2:30PM right now but the event is showing in both Past Events and Upcoming Events. This should not be the case since the event is technically still ongoing and should stay in Upcoming until it reaches the end time.
The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.
November 18, 2016 at 9:13 am #1194572RANDY
Participant“The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.”
Oops what I meant to say was:
The new code has put the ongoing event back in Past Events again.
November 21, 2016 at 1:23 pm #1195512Nico
MemberThanks for following up Randy!
Glad to hear the code worked! Basically the code you were using was not taking time in account.
Regarding the times not being the correct ones, Can you please check the site timezone (WP-Admin > Settings > General > Timezone)? And also Events timezone settings in WP-Admin > Events > Settings > General? That might be the cause of the offset you are seeing.
Please let me know about it,
Best,
NicoNovember 21, 2016 at 1:40 pm #1195523RANDY
ParticipantNico,
The code is not working as expected yet.
For the setting under events, it is currently set to:
Timezone mode: Use the local timezones for each event
Show timezone: UncheckedTime zone for general WordPress is correctly set for Los Angeles.
November 22, 2016 at 1:22 pm #1196168Nico
MemberThanks Randy!
Timezone mode: Use the local timezones for each event
This mean the configured Timezone in each event will be used. Can you check what’s the timezone for events you noticed failed?
Also, is there an off set you noticed? For example: events are getting to past event one hour earlier or later than expected?
Thanks,
NicoDecember 14, 2016 at 8:35 am #1205915Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Event Shouldn't Be Showing in Past Events Yet’ is closed to new replies.
