Created
February 26, 2015 04:52
-
-
Save bordoni/0e3dd416cfe673ad6d8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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