Im trying to build a taxonomy query to only display the terms that have a certain custom field value assigned to it. The custom field holds a boolean value, so I tried:
$args = array(
'taxonomy' => 'product_cat',
'hide_empty' => false,
'meta_key' => 'featured',
'meta_value' => true
);
Also:
$args = array(
'taxonomy' => 'product_cat',
'hide_empty' => false,
'meta_query' => array(
array(
'key' => 'featured',
'value' => true,
'compare' => '='
)
)
);
None of these returned the expected results. What am I missing?