Support

Account

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.