Home › Forums › General Issues › Two taxonomy fields excluding each other › Reply To: Two taxonomy fields excluding each other
I don’t have an exact answer for you, only a possible path to solving it.
You will want to start here https://www.advancedcustomfields.com/resources/javascript-api/#filters-select2_ajax_data
and here https://www.advancedcustomfields.com/resources/acf-fields-taxonomy-query/
The first thing you’ll need to to is to alter the ajax data being sent for each field to include the values selected in the other field.
Then in the query filters for each field you need to get the values sent in the ajax query and use that value in the ‘exclude’ argument for get_terms().
Sorry that I cannot provide any code for you.
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.