Hello friends,
I am using ACF Pro 5.5.12v. I have a field group that is equal to my TaxonomyName(“destination”). In this group I made a custom field with type “checkbox” and name “picmenu”. I am trying to display all term names which have selected some specific checkbox value.
var_dump returns “array(0) { }”.
By the way, I’m not sure is this is the way to get terms with meta value.
<?php
$terms = get_terms(
array(
'taxonomy' => 'destination',
'hide_empty' => false,
'meta_query' => array(
array(
'key' => 'picmenu',
'value' => 'test',
'compare' => '=',
)
),
)
);
?>
<?php var_dump($terms); ?>
I found my mistake here
'compare' => '=',
Need to be like
'compare' => 'LIKE',