I have a custom post type called Location with a custom field called City. I also have taxonomies on that post type called Specialties. The specialty filter works just fine with the tax_query
, but I can’t get the custom field to filter.
This is not working, and neither is just about everything else I’ve been trying:
$args = array('post_type' => 'location',
'tax_query' => array(
array(
'taxonomy' => 'specialties',
'field' => 'slug',
'terms' => $specialty,
)),
'meta_query' => array(array('city' => $location,'compare' => '=',))
);