I’m creating a module for the “single event view” screen. This module needs to retrieve a list of three events that are related to the current event being viewed. I’m telling it to look for events that share an tribe_events_cat with the current event. At the moment, it’s pulling in three events from a recurring series. I would like it to pull in only the next-upcoming event in the series, and then pull in two other events. Below is my current query. How can I modify it so that duplicate events don’t get returned?
$items = tribe_get_events(array(
'posts_per_page' => 3,
'eventDisplay' => 'upcoming',
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'tribe_events_cat',
'field' => 'term_id',
'terms' => $event_cat_ids,
'operator' => 'IN'
),
array(
'taxonomy' => 'post_tag',
'field' => 'term_id',
'terms' => $event_tag_ids,
'operator' => 'IN'
),
),
));