OK, so that’s a little example of what I call “wishful coding” 😉
get_terms(array(
'taxonomy' => 'property-status',
'value' => array('For Rent', 'Arrendamento'),
'compare' => 'IN',
) )
You use get_terms
function here, which will
Retrieve the terms in a given taxonomy or list of taxonomies.
And you use this inside of meta_query part of a query, which is used to query custom fields.
So there is no way it could do anything at all… Terms are not valid meta_query queries…
But of course it can be done… All you need to do is to check docs for WP_Query
…
You already have this:
$featured_properties_args = array(
'post_type' => 'property',
'posts_per_page' => 12,
'meta_query' => array(
array(
'key' => 'REAL_HOMES_featured',
'value' => 1,
'compare' => '=',
'type' => 'NUMERIC'
)
)
);
and you know it gets you featured properties. So all you have to do is to add your tax query in there:
$featured_properties_args = array(
'post_type' => 'property',
'posts_per_page' => 12,
'meta_query' => array(
array(
'key' => 'REAL_HOMES_featured',
'value' => 1,
'compare' => '=',
'type' => 'NUMERIC'
)
),
'tax_query' => array(
array(
'taxonomy' => 'property-status',
'field' => 'name',
'terms' => array('For Rent', 'Arrendamento'),
)
)
);