Checking if event is all day?

Home Forums Calendar Products Events Calendar PRO Checking if event is all day?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #962618
    popularpixel
    Participant

    Im working on checking if events in the list widget are an all day event. Whats the best way?

    My code <?php if (tribe_event_is_all_day()){ //do stuff } ?> is not working, and breaks the site (white screen).

    #962680
    Barry
    Member

    Hi popularpixel,

    The tribe_event_is_all_day() function is exactly what I would have suggested. Could you perhaps share your complete code via Pastebin, Gist or some similar service so I can see what might be going wrong (can you also indicate where it is being used, exactly)?

    Thanks!

    #963967
    popularpixel
    Participant

    Thanks for the reply Barry,

    Heres a link to the Gist: https://gist.github.com/bransonwerner/7f6352283e8ba3b4c6fd

    You will see the code on line 62-66. The file is the List Widget for the Pro version (override in /wp-content/themes/theme-name/tribe-events/pro/widgets/list-widget.php). Im trying to write a custom message if the event is an All Day Event.

    #963970
    popularpixel
    Participant

    I got this resolved. It was an EBCAK error, LOL.

    Thanks for your help.

    #963980
    Barry
    Member

    Glad it’s all working 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Checking if event is all day?’ is closed to new replies.