I am trying to:
Show only one event photo if event repeats itself on same day.
Link to a page where the issue can be seen:
hidden link (box 'co dzis gramy' - slider)
I expected to see:
One event - not multiple same events (in different hours)
Instead, I got:
Duplication of same featured image.
I got help before from you before: https://toolset.com/forums/topic/views-and-event-calendar-pro-date-offset-how-show-events-from-today/
and I made my own modification to display events from this day only (not sure if it is best way):
----
function tssupp_filter_event_query2( $view_args, $view_settings, $view_id ){
if ( in_array( $view_id, array( 187 ) ) ) { // Edit view IDs
if ( ! isset( $view_args['meta_query'] ) ) {
$view_args['meta_query'] = array();
}
$meta_query = array(
'key' => '_EventStartDate',
'value' => date("Y-m-d"),
'type' => 'NUMBER',
'compare' => '>'
);
$meta_query2 = array(
'key' => '_EventStartDate',
'value' => date("Y-m-d", strtotime('+1 day')),
'type' => 'NUMBER',
'compare' => '<'
);
$view_args['meta_query'][] = $meta_query;
$view_args['meta_query'][] = $meta_query2;
}
return $view_args;
}
add_filter( 'wpv_filter_query', 'tssupp_filter_event_query2', 101, 3 );
-----
In my view I display only featured image (in slider) but I don't know how to display only one if it occurs multiple times on this one day. Could you help me with that?