WP_Query: orderby post_type (set order)
-
I would like to order by post_type, but I would like to set the order. Is this possible? I have an array of post types
$post_type = array('article', 'book', 'magazine', 'review'); $args = array( 'post_type' => $post_type, 'orderby' => 'menu_order post_type', 'order' => 'DESC', ); $query = new WP_Query( $args );
I’m not sure how the order is being determined here, as it’s returning:
article, magazine, book, review…which is odd. Any way to set the order?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Query: orderby post_type (set order)’ is closed to new replies.