Past Events

Home Forums Calendar Products Community Events Past Events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1180591
    Gregg
    Participant

    What is the best way to handle events that have passed? We have a website that features a number of events that have already taken place. But we don’t want all of these old events to be indexed. Is there an option in the plugin to save events up to a set amount of time? Is there a way to archive those rather than having to constantly be redirecting event links for events that have already taken place?

    #1181147
    Hunter
    Moderator

    Welcome back, Gregg 🙂

    With the new shortcodes, displaying past events should be a breeze. We are currently working on this functionality, but it should be available any day now. We do have a current workaround which I’ll provide below. Please let me know if you have any questions. I’ll link this thread to the feature report for the developers to review while making improvements. Keep an eye on our Release Notes and your WP admin dashboard for update info.

    Add the following code to the bottom of your theme’s functions.php file. The shortcode to display past events is [tribe_past_events view=”list”]. Let me know how it goes!

    function tribe_past_events_shortcode( $atts ) {
    if ( ! class_exists( 'Tribe__Events__Pro__Shortcodes__Tribe_Events' ) ) return '';
    add_action( 'parse_query', 'tribe_past_events_shortcode_modify_query' );
    $shortcode = new Tribe__Events__Pro__Shortcodes__Tribe_Events( $atts );
    return $shortcode->output();
    }

    function tribe_past_events_shortcode_modify_query( $query ) {
    $query->set( 'tribe_is_past', true );
    remove_action( 'parse_query', 'tribe_past_events_shortcode_modify_query' );
    }

    add_shortcode( 'tribe_past_events', 'tribe_past_events_shortcode' );

    #1182453
    Armin
    Participant

    Hey there,

    we are currently developing a website for a customer and need exactly this parameter, e.g. like [tribe_events_list category=”festival” past=”yes”] (or something alike) to show past events.

    I know, only 4 days have passed since your answer, but do you have any updates on this topic? It would make things so much more comfortable! 🙂

    Best
    Lennart

    #1182923
    Hunter
    Moderator

    Lennart,

    I don’t have any new info for you since my last response, so as previously mentioned, keep an eye on you WordPress dashboard and our Release Notes for more info.

    Thank you for your patience and take care.

    #1193203
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Past Events’ is closed to new replies.