Order by two meta keys

Question

I have this code which works fine:

 $args = array('post_type' => 'brands','meta_query' => array( array( 'key' => 'br_type', 'value' => 'Aviation')),'posts_per_page' => -1,'meta_key' => 'br_name','orderby' => 'meta_value','order' => 'ASC','fields' => 'ids');

However, I need to order first by ascending order by another custom field "br_category" and then by the name br_name. I am not sure how to implement this.

0
, Joanna Mikalai 4 years 2019-12-02T11:47:44-05:00 0 Answers 81 views 0

Leave an answer

Browse
Browse