Home › Forums › General Issues › get_terms() with multiple values › Reply To: get_terms() with multiple values
UPDATE: For anyone else who encounters this…
It turns out, the first option DOES work. You can pass an array to a meta_value. HOWEVER, the operator ‘=’ does not work. Changing the compare to ‘IN’ works for my scenario. Final code:
$people_array = array(73227,970674,17293);
$args = array(
'taxonomy' => 'people',
'meta_query' => array(
array(
'key' => 'person_id',
'value' => $people_array,
'compare' => 'IN'
),
)
);
$people = get_terms( $args );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.