Home › Forums › General Issues › How to filter tax terms by custom field, what am I doing wrong here? › Reply To: How to filter tax terms by custom field, what am I doing wrong here?
checkobxes are stored as serialzed data. The value returned by get_field is going to be an array. So you need to do something like:
if (in_array('Fiction', get_field('book_group', 'book_type_'.$term->term_id))
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.