Created
May 24, 2021 15:36
-
-
Save skyshab/987a615b93c6fa9d4e322da296fa8c72 to your computer and use it in GitHub Desktop.
Hide past or current events that started before today from the calendar views.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hide past or current events that started before today from the calendar views. | |
add_filter( 'tribe_events_views_v2_view_repository_args', function( $args, $context, $view ) { | |
$args['starts_on_or_after'] = current_time('Y-m-d H:i:s'); | |
return $args; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment