Home › Forums › ACF PRO › Using compare IN operator for meta_query › Reply To: Using compare IN operator for meta_query
I took an alternate solution for this using get_posts(), get_post_meta() to get the ids of my post type and the checkbox fields data and then comparing the meta with array_intersect() and in_array() for more accuracy.
This works better than the ‘LIKE’ operator which was giving me unexpected results.
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.