• Resolved raphaelduran

    (@raphaelduran)


    The list of upcoming events sorts the events in ascending order by default starting from today’s day. I’d like for it to be able to show it in a descending order so today’s event is the last one and the latest future events are the first events to show up. Does anybody know how I can do that?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Abz

    (@abzlevelup)

    Hi @raphaelduran,

    Thanks for reaching out to us. Out of the box, we do not have this feature/option in our plugin. But let me ask our team, if we do have a workaround for this.

    I’d get back to you as soon as I hear from the team. Have a great weekend.

    Best,
    Abz

    Hi (@raphaelduran)

    You have to change small changes in the code then it works.

    But you Have to override In the event calendar view in the Child theme and add your code.

    Plugin Support Abz

    (@abzlevelup)

    Hi @raphaelduran,

    Appreciate your patience. One of our devs got back to me with a filter.

    Go to Appearances → Theme File Editor → Select Theme → functions.php, or you could install third-party plugin Code Snippet. Could you try this snippet here:

    function tribe_list_reverse_chronological_v2( $template_vars ) {
    	if ( ! empty( $template_vars['is_past'] ) ) {
    		return $template_vars;
    	}
     
    	$template_vars['events'] = array_reverse( $template_vars['events'] );
    	
    	return $template_vars;
    }
    
    add_filter( 'tribe_events_views_v2_view_list_template_vars', 'tribe_list_reverse_chronological_v2', 100 );

    See screenshot here:
    https://share.getcloudapp.com/04uEQjOl

    Let me know how it goes!

    Best,
    Abz

    Thread Starter raphaelduran

    (@raphaelduran)

    Thank you so much. It worked!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the order of upcoming events’ is closed to new replies.