Snippet to reverse events
-
Time ago, I ask for help for this
“I would like that pass events appears in the page in the reverse order, I mean, that de most recent appear firstly and later the older”.
And you offer me this snippet:
// Changes past event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {$past_ajax = (defined( ‘DOING_AJAX’ ) && DOING_AJAX && $_REQUEST[‘tribe_event_display’] === ‘past’) ? true : false;
if(tribe_is_past() || $past_ajax) {
$post_object = array_reverse($post_object);
}return $post_object;
}
add_filter(‘the_posts’, ‘tribe_past_reverse_chronological’, 100);But now, with the update it stops to work, could you help me again, thanks.
The page I need help with: [log in to see the link]
- The topic ‘Snippet to reverse events’ is closed to new replies.