Home › Forums › General Issues › Register fields for a CPT for each term in taxonomy › Reply To: Register fields for a CPT for each term in taxonomy
I do not know of you’ve figured this out yet or not, but I don’t see anything wrong in your add_local_field() code. The only thing I can come up with is that your query is not returning what you think it should be returning.
I would try using wp_get_object_terms() rather than a custom query. https://developer.wordpress.org/reference/functions/wp_get_object_terms/
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.