Home › Forums › Calendar Products › Community Events › Past Events
- This topic has 5 replies, 5 voices, and was last updated 7 years, 6 months ago by Gregg.
-
AuthorPosts
-
October 21, 2016 at 8:36 am #1180591GreggParticipant
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?
October 21, 2016 at 8:48 pm #1181147HunterModeratorWelcome 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' );
October 25, 2016 at 8:06 am #1182453ArminParticipantHey 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
LennartOctober 25, 2016 at 7:07 pm #1182923HunterModeratorLennart,
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.
November 16, 2016 at 8:35 am #1193203Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Past Events’ is closed to new replies.