Home › Forums › General Issues › Querying taxonomy field inside a repeater? › Reply To: Querying taxonomy field inside a repeater?
Hi @panmac
To query a sub field value, especially if it is an array (checkbox) value, you are going to have to understand completely the SQL going on and be able to debug the code line by line to find any issues. If this is looking to be in the ‘too hard’ barsket, I highly encourage you to hire a freelancer to take a look at this part of your project.
However, it is possible to write the code you are seeking. Once you have got the LIKE SQL working, you will need to change the line:
AND meta_value = %s
to:
AND meta_value LIKE %s
and that should allow you to search for values within the array!
Thanks for being a good sport.
Thanks
E
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.