May I query posts by taxonomy field as one would do for a checkbox field, for example?
I don’t wish to activated Load or Save terms in the taxonomy field (as I don’t need the extra classes created by post_class function) and was trying to query the posts with meta_query and not tax_query. Possible?
If you are not saving and loading terms then you must use a meta_query. But, ACF stores the term ID of each term selected, not the term name. And you’re like value needs to look something like '"'.$term_id.'"' because ACF stores a serialized array for the selected terms.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users