Filtering posts for unique titles, only the most recent
You can try this. However, I am sure there must be a better alternative.. $past_events = get_posts(array( ‘post_type’ => Tribe__Events__Main::POSTTYPE, ‘paged’ => $paged, ‘posts_per_page’ => ’10’, ‘eventDisplay’=>’past’, ‘orderby’=> ‘title’, ‘order’ => ‘ASC’, ‘s’ => $searchText ?: ”, )); $post_arr = array(); foreach ( $past_events as $past_event ) { $post_arr[ $past_event->post_title ] = $past_event->ID; } $post_arr … Read more