New answers tagged tax-query
Instead of in_category try has_term - http://codex.wordpress.org/Function_Reference/has_term This should work (I've tested it in a simpler form on my localhost): <?php get_header(); ?> <div id="body"> <div class="fix"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php if ( ...
tl;dr; This is not possible with tax_query. A tax_query is a restriction of the results delivered, not used to order posts. You use the Order & Orderby Parameters for that. A little excursion into statistics This has to do with statistics and mathematics, as a taxonomy is a nominal scale, meaning it is just a classification, where every item is on ...
It's already a hierarchical post type - no need for some extra meta value just for the order. You can simply add post type support for page-attributes when registering the post type. This will give you the "menu order" meta box that pages have per default. Then simply order your query by it: 'orderby' => 'menu_order'
You can't oder by taxonomy term with WP_Query. You could do it with some custom SQL, but if the terms are hardcoded into the query anyway, just iterate over an array of terms in the order you want, then for each term loop over the posts within and check if it's associated to that term- $args = array( 'post_type' => 'staff', 'posts_per_page' => ...
Top 50 recent answers are included