WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
tribe_is_passed() function (3 posts)

  1. ababra
    Member
    Posted 11 months 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
    }
    }

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. ababra
    Member
    Posted 11 months ago #

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

  3. jonahcoyote
    Member
    Posted 11 months 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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.