Need to order by title then slug
-
I am trying to workout how to orderby title then a slug but having no luck. The code below works but I need to change the meta_key to a taxonomy. Any ideas? This on a local build not online yet as I am testing the code.
$argsnf = array( 'post_type' => 'mining-company', 'post_status' => 'publish', $taxmw => $slugmw, 'meta_key' => 'bw-mining_state', // Name of meta key 'orderby' => 'title meta_value', // Order by number of meta value 'order' => 'ASC', // Order by lowest to highest value (1,2,3,4,..) 'tax_query' => array( array( 'taxonomy' => 'mw-buss_type', 'field' => 'id', 'terms' => 189, 'operator' => 'NOT IN' ) ) ); $the_query = new WP_Query( $argsnf );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Need to order by title then slug’ is closed to new replies.