Home › Forums › Calendar Products › Events Calendar PRO › All Day Event Problems
- This topic has 5 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
January 11, 2012 at 1:51 pm #13220
Jason
ParticipantIn your FAQ’s you describe how to check for “All Day Events” and change the display in the template accordingly
I use the following date format: $event_date = date(‘F j, Y, g:i a’,strtotime($e->EventStartDate));. But I want “All Day” events formatted in such a way that they don’t show as starting at 12 am. Is it possible to form an if statement to check for all day events?
It is. This code should allow you to check whether it’s an all-day event in the loop:if (get_post_meta($e->ID, 'EventAllDay', true) == 'yes') { // do something.However that statement is wrong. The function returns a boolean value, so it will never evaluate to “yes”. Also, the function is broken. It returns bool(false) no matter which way the “All Day Event” box is checked in the event entry screen.
ID, 'EventAllDay', true)); ?>can be viewed in the left sidebar here :Contact me directly at [email protected] and I can provide you with an administrative login to the wordpress installation so you can toggle the checkbox for yourself.
January 11, 2012 at 6:56 pm #13238Rob
MemberThanks for noting this one, Jason – my guess is we wrote that before changing the code base and the FAQ never got updated. Let me double check with Jonah on this and we’ll update the FAQ entry accordingly from there. Thanks for the heads up!
January 12, 2012 at 11:57 am #13279Jonah
ParticipantHi Jason, you should be able to just use: tribe_get_all_day() which will return true if the event is an all day event. I will update the FAQ accordingly. Thanks for pointing this out.
January 12, 2012 at 12:02 pm #13282Jason
Participantthis works, thanks!
January 12, 2012 at 12:37 pm #13294Rob
MemberThanks for confirming, Jason. Glad to see we were able to get that taken care of. Let us know what else we can do.
July 3, 2015 at 5:00 pm #975270Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘All Day Event Problems’ is closed to new replies.
