Multiple Custom Meta Ordering in WP_Query?
-
I have really been looking forward to sorting by multiple post metas on my custom post type and when I saw this post and I am using this array as my arguments but it won’t sort by both post metas?
Array ( [post_type] => listings [meta_query] => Array ( [0] => Array ( [key] => car_sold [compare] => EXISTS ) [1] => Array ( [key] => make [compare] => EXISTS ) ) [paged] => 1 [posts_per_page] => 30 [order] => ASC [suppress_filters] => [orderby] => Array ( [make] => ASC [car_sold] => DESC ) )
Does anyone see something not quite right with the arguments I maybe overlooked? Or am I misunderstanding the new query improvements?
Thanks.
- The topic ‘Multiple Custom Meta Ordering in WP_Query?’ is closed to new replies.