Created
August 12, 2014 07:10
-
-
Save danjjohnson/5e465e33a46851e1e3d8 to your computer and use it in GitHub Desktop.
Change order of course catgories
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
function change_course_taxonomy_order( $query ) { | |
// Are we querying a course-category archive? | |
if ( is_tax( 'course-category' ) && $query->is_main_query() ) { | |
$query->set( 'posts_per_page', '6' ); | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'change_course_taxonomy_order' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment