• Resolved carlosvai

    (@carlosvai)


    Hi, I scanned the whole web and found some threads about this, but none of those solutions worked for me.
    For example here https://support.advancedcustomfields.com/forums/topic/exclude-taxonomy-terms-from-frontend-display/

    I added many variants of this code

    add_filter('acf/fields/taxonomy/wp_list_categories', 'my_taxonomy_args', 10, 2);
    
    function my_taxonomy_args( $args, $field )
    {
       $args['exclude'] = array(16, 15, 17); //the IDs of the excluded terms
        return $args;
    }

    also with specific field name

    add_filter('acf/fields/taxonomy/wp_list_categories/name=test_tax2', 'my_taxonomy_args', 10, 2);
        
        function my_taxonomy_args( $args, $field )
        {
                $args['exclude'] = array(64,65,66); //the IDs of the excluded terms
            return $args;
        }

    and with the query function instead of wp_list_categories
    But I always end up with all the terms in the taxonomy field.

    Is there any workaround this?
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there!

    ACF Support Team here. This forum is generally used by ACF users to help each other out. However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ?support form and we can look into it further.

    Thread Starter carlosvai

    (@carlosvai)

    Thanks a lot!
    But I can’t find the support mail in that page ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude taxonomy terms’ is closed to new replies.