Skip to content

Instantly share code, notes, and snippets.

@bordoni
Created February 26, 2015 04:52
Show Gist options
  • Save bordoni/0e3dd416cfe673ad6d8a to your computer and use it in GitHub Desktop.
Save bordoni/0e3dd416cfe673ad6d8a to your computer and use it in GitHub Desktop.
<?php
add_action( 'pre_get_posts', 'tribe_post_date_ordering', 51 );
function tribe_post_date_ordering( $query ) {
if ( $query->tribe_is_multi_posttype) {
remove_filter( 'posts_fields', array( 'TribeEventsQuery', 'multi_type_posts_fields' ), 10, 2 );
$query->set( 'order', 'DESC' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment