cliff
1/27/2016 - 5:49 PM

MT | TEC | Set the default date for views like List and Month (e.g. set date to prior to any events to display all prior/past events). If yo

MT | TEC | Set the default date for views like List and Month (e.g. set date to prior to any events to display all prior/past events). If you only want it to apply to List view, check that it's List view.

<?php

/*
 * Set the default date for views like List and Month
 */
function tribe_set_default_date () {
	if ( !is_single() && empty( $_REQUEST['tribe-bar-date'] ) ) {
		$_REQUEST['tribe-bar-date'] = '2000-01-01';
	}
}
add_action( 'parse_query', 'tribe_set_default_date' );