Hi,
Wasn’t sure how to share this but this is a post about solving the order by end date issue.
Here is the code:
global $post;
$upcoming=tribe_get_events( array(
'post_type'=>'tribe_events',
'eventDisplay'=>'upcoming',
'showposts' => '-1')
);
$upcoming = new WP_Query();
$upcoming->query( array(
'meta_key'=> '_EventEndDate',
'orderby'=>'meta_value_num',
'post_type'=>'tribe_events',
'eventDisplay'=>'upcoming',
'showposts' => '-1')
);
if ($upcoming->have_posts()) :
while ($upcoming->have_posts()) : $upcoming->the_post();
echo tribe_get_start_date(get_the_ID()).' - '.tribe_get_end_date();
endwhile; endif; wp_reset_query();
Note I have the variable $upcoming filled twice with two different arrays without this it does not work for some reason. So this works but I am not sure why.
Please feel free to share and enjoy 😀