Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Created February 12, 2014 03:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billrobbins/8949786 to your computer and use it in GitHub Desktop.
Save billrobbins/8949786 to your computer and use it in GitHub Desktop.
function foundation_pre_posts( $query ) {
if ( is_tax( 'staff-group' ) && $query->is_main_query() ) {
// displays in post order
$query->set( 'order', 'ASC' );
$query->set( 'orderby', 'menu_order' );
return;
}
}
add_action( 'pre_get_posts', 'foundation_pre_posts', 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment