I think this is Ailsa who left a comment n my you tube video about this. I got some answer from the essential grid people.
This is what I added to the functions.php file. You need to change the grid alias number. In my case below I have a query for future events, on 2 grids and a query to stop caching (I had some issues with the grid so you may need this too). You may need it all or choose which bit you need.
add_filter(‘essgrid_query_caching’, ‘eg_disable_caching’, 10, 2);
function eg_disable_caching($do_cache, $grid_id){ //disable caching for the particular grid
if($grid_id == 43 || $grid_id == 48 || $grid_id == 50){ //replace 1 with your desired grid id
return false;
}
return true;
}
add_filter(‘essgrid_get_posts’, ‘eg_modify_query’, 10, 2);
function eg_modify_query($query, $grid_id){
if($grid_id == 43 || $grid_id == 48){ //replace 1 with your desired grid id
$query[‘meta_query’] = array( ‘key’ => ‘_start_ts’, ‘value’ => current_time(‘timestamp’), ‘compare’ => ‘>=’, ‘type’=>’numeric’ );
$query[‘meta_key’] = ‘_start_ts’;
$query[‘meta_value’] = current_time(‘timestamp’);
$query[‘meta_value_num’] = current_time(‘timestamp’);
$query[‘meta_compare’] = ‘>=’;
}
if($grid_id == 50){ //replace 1 with your desired grid id
$query[‘meta_query’] = array( ‘key’ => ‘_start_ts’, ‘value’ => current_time(‘timestamp’), ‘compare’ => ‘<=’, ‘type’=>’numeric’ );
$query[‘meta_key’] = ‘_start_ts’;
$query[‘meta_value’] = current_time(‘timestamp’);
$query[‘meta_value_num’] = current_time(‘timestamp’);
$query[‘meta_compare’] = ‘<=’;
}
return $query;