The calendar’s list and photo views show past events in chronological order by default. That means the oldest events are displayed first and get newer as you go. If you like to show the events in reverse order, where the newest events are displayed first, you can use this snippet.

Add this to your theme’s functions.php file. You will then see events showing in reverse chronological order, with the most recent past event at the top of the page in the calendar’s list and photo views.

/**
 * Changes Past Event Reverse Chronological Order
 *
 * @param array $template_vars An array of variables used to display the current view.
 *
 * @return array Same as above. 
 */
function tribe_past_reverse_chronological_v2( $template_vars ) {

  if ( ! empty( $template_vars['is_past'] ) ) {
    $template_vars['events'] = array_reverse( $template_vars['events'] );
  }

  return $template_vars;
}
// Change List View to Past Event Reverse Chronological Order 
add_filter( 'tribe_events_views_v2_view_list_template_vars', 'tribe_past_reverse_chronological_v2', 100 );
// Change Photo View to Past Event Reverse Chronological Order
add_filter( 'tribe_events_views_v2_view_photo_template_vars', 'tribe_past_reverse_chronological_v2', 100 );

Show past events in reverse order with a shortcode

If you are using a shortcode to display your events and would like to show the past events in reverse order there as well, you can add the following snippet to your theme’s functions.php file.

<?php

add_filter(
	'tribe_events_views_v2_view_template_vars',
	function( $template_vars, $view ) {
	  	$context = $view->get_context();
   
		// Not doing a shortcode - bail.
		if ( empty( $context->get( 'shortcode' ) ) ) {
			return $template_vars;
		}
	   
		// Get the date set for the shortcode and today's date
		$targetDate = strtotime($template_vars['request_date']->format( 'Y-m-d' ));
		$currentDate = strtotime(date("Y-m-d"));

		// If the date set in the past set is_past true
		if ($targetDate < $currentDate) {
			$template_vars['is_past'] = true;
		}

		// reverse order if is_past true
		if ( !empty( $template_vars['is_past'] ) ) {
			$template_vars['events'] = array_reverse( $template_vars['events'] );
		}
   
	  	return $template_vars;
	},
	8,
	2
);