Home › Forums › General Issues › Taxonomy field by ids and wp_query › Reply To: Taxonomy field by ids and wp_query
To look for multiple values, this:
'meta_query' => array(
array(
'key' => 'assign_to_taxonomies',
'value' => array ( '689', '452', '744' ),
'compare' => 'IN'
)
Would need to look like this:
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'assign_to_taxonomies',
'value' => '"689"'
'compare' => 'LIKE'
),
array(
'key' => 'assign_to_taxonomies',
'value' => '"452"'
'compare' => 'LIKE'
),
array(
'key' => 'assign_to_taxonomies',
'value' => '"744"'
'compare' => 'LIKE'
)
)
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.