Hi Mike!
Thanks for reaching out! Happy to help you with this topic.
You can hide past events using the following snippet.
add_filter('tribe_events_pre_get_posts', 'filter_tribe_all_occurences', 100);
function filter_tribe_all_occurences ($wp_query) {
if ( !is_admin() ) {
$new_meta = array();
$today = new DateTime();
// Join with existing meta_query
if(is_array($wp_query->meta_query))
$new_meta = $wp_query->meta_query;
// Add new meta_query, select events ending from now forward
$new_meta[] = array(
'key' => '_EventEndDate',
'type' => 'DATETIME',
'compare' => '>=',
'value' => $today->format('Y-m-d H:i:s')
);
$wp_query->set( 'meta_query', $new_meta );
}
return $wp_query;
}
I haven’t tested much and might need extra adjustments but I believe that is a good starting point to achieve what you are looking for.
Also, let me point you to the following article about caching the month view > https://theeventscalendar.com/knowledgebase/caching-month-view-transients/
Hope it helps. 🙂
Best,
Victor