Support » Plugin: The Events Calendar » tribe_is_passed() function

  • In a custom plug-in, I’m trying to determine if an event has passed and then do stuff in PHP (see snippet below). I thought I could use tribe_is_past() but am not getting the results I require.

    Here’s what I’m basically trying to do:

    function eventscalendar_isEventPassed($post_id) {
    if (tribe_is_past()) {
    return true;
    } else {
    //do stuff

Viewing 2 replies - 1 through 2 (of 2 total)
  • I forgot to mention, I’m not doing this inside The Loop

    Hi ababra,

    tribe_is_past() is only used to detect if the current query is for past events, not for a single event. I’m not sure how else you can do this, it’s definitely possible, but I cannot help you here. You might try comparing the start/end date to today’s date instead… Or, search through our docs:

    – Jonah

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘tribe_is_passed() function’ is closed to new replies.