Template Conditionals (again)

Home Forums Calendar Products Events Calendar PRO Template Conditionals (again)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26127
    Kyle
    Participant

    My apologies for bumping the post from the other day that was just closed(https://theeventscalendar.com/support/forums/topic/trouble-with-targeting-templates-from-functions-file/), is there a conditional for past event days? or if there is no events and it returns the error? I was having trouble getting those conditionals to work with that happening

    #26189
    Barry
    Member

    I don’t think there is a conditional to detect if an event has passed (if that’s what you are asking). Something you could do however is compare the start or end dates (obtainable via the tribe_get_start_date() and tribe_get_end_date() and compare their output to the current date.

    Does that help here?

    #26359
    Kyle
    Participant

    Thank you for the reply. After finding exactly where the error was coming from in the list.php I found the tribe_is_past() function, which solved it

    #26361
    Barry
    Member

    Glad that worked for you – though I believe that works where the query is set to past events, not if an individual event has passed – of course if that meets your needs then that’s great 🙂

    #26363
    Kyle
    Participant

    Oh okay, yeah now that I re-read my post I could have explained that better. I believe that is what I was originally looking for and didn’t explain it well

    #26365
    Barry
    Member

    Hey no problem – so long as you’ve got whatever you need working that’s all good 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Template Conditionals (again)’ is closed to new replies.