Conditional for Single Event that is Past

Home Forums Calendar Products Events Calendar PRO Conditional for Single Event that is Past

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #133486
    Shaun
    Participant

    Is there a way to test if an event is Past in the Single Event view?

    #133543
    Barry
    Member

    Could you compare today’s date with the event start or end date – whichever is appropriate in your case – and test things that way?

    Example:

    $is_past = ( date('Y-m-d') > tribe_get_end_date( null, false, 'Y-m-d' ) );

    Would that work here?

    #140562
    Shaun
    Participant

    This works great! Thanks

    #141235
    Barry
    Member

    Excellent!

    I’ll go ahead and close the thread since it looks like you’re all sorted.

    If you happen to have a moment though and would like to leave some feedback on our review page that would be awesome – it’s always really useful to hear about people’s experiences with The Events Calendar 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Conditional for Single Event that is Past’ is closed to new replies.