I have a client who was frustrated that the Related Events list on their site was randomly showing events that are several months into the future, rather than showing events that are coming up in the next few days or weeks.
In troubleshooting the issue, I found the tribe_get_related_posts() function offers a filter to override the default arguments, and I was able to get what I needed with the following modification:
add_filter('tribe_related_posts_args', function($args) {
$args['meta_key'] = '_EventStartDate';
$args['orderby'] = 'meta_value';
return $args;
});
I would like to suggest that these should be the default arguments for this function. It doesn’t make a lot of sense to me as the developer, nor to my clients as site owners/users, to have random events in the distant future showing up in the results.