I am trying to apply multiple custom fields for orderby in WP_Query. What I am going to achieve is to sort the posts by the city
first and then order the street_name
within each city but not luck. Here is my code.
$args = array(
'meta_query' => array(
array(
'relation' => 'AND' ,
array(
'meta_key' => 'city',
'orderby' => 'meta_value',
'order' => 'ASC'
),
array(
'meta_key' => 'street_name',
'orderby' => 'meta_value',
'order' => 'ASC'
),
)
)