I am using The event calendar. I would like to adjust the events. so they don't move over to past events for an hour after they end. So for example, if an event ends at 3 PM EST we don't want it to move to the past events page until 4 PM EST.
In short: I want to set the event end date before 1 hour.
So Evet not going on past.
I have added the below code on the functions.php file
add_filter( 'parse_query', 'posts_filter2',15 );
function posts_filter2( $query ){
$type = 'tribe_events';
if (isset($_GET['post_type'])) {
$type = $_GET['post_type'];
}
if ( 'tribe_events' == $type && $query->get( 'eventDisplay' ) == 'default') {
$queryParamsCounter = 0;
$notification = "2021-04-16 13:06:00";
if (isset($notification)) {
$meta_query['ends-after'] = array(
'key' => '_EventEndDate',
'value' => $notification,
'compare' => '>',
'type' => 'DATETIME',
);
}
$query->set( 'meta_query', $meta_query);
}
}
But still not working.
Does anyone know about this?
Thanks!