The Events Calendar
tribe_is_passed() function (3 posts)

  1. ababra
    Posted 2 years ago #

    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


  2. ababra
    Posted 2 years ago #

    I forgot to mention, I'm not doing this inside The Loop

  3. jonahcoyote
    Posted 2 years ago #

    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: http://docs.tri.be/

    - Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.