All Day Event Problems

Home Forums Calendar Products Events Calendar PRO All Day Event Problems

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13220
    Jason
    Participant

    In 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 :

    http://www.barnumfestival.com.php5-19.dfw1-2.websitetestlink.com/event/tom-thumb-lavinia-warren-contest/

    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.

    #13238
    Rob
    Member

    Thanks 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!

    #13279
    Jonah
    Participant

    Hi 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.

    #13282
    Jason
    Participant

    this works, thanks!

    #13294
    Rob
    Member

    Thanks for confirming, Jason. Glad to see we were able to get that taken care of. Let us know what else we can do.

    #975270
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘All Day Event Problems’ is closed to new replies.