Home Forums General Issues Disable level 1 of taxonomies


Disable level 1 of taxonomies

  • Is it possible to disable radio buttons on level 1 for the taxonomy fields ?
    I just want to add the attribute “disabled” on the top level of my taxonomy. I want to modify this code that is a good start I mean :

    function my_taxonomy_args( $args, $field )
        $args['depth'] = 1;
        // do stuff to $args
        return $args;
    add_filter('acf/fields/taxonomy/wp_list_categories/key=field_54d1dff91fb75', 'my_taxonomy_args', 10, 2);

    Thank you

  • I’m not exactly sure what it is that you’re asking.

    If you are still looking for help with this could you elaborate further on what you’re doing? Do you want to hide a field, like conditional logic, if it is for a top level term in a taxonomy?


  • Visually, i try to do that :

    Instead of that :

  • Something like that could be possible by adding custom JavaScript to a field. There is documentation for that here:

    You’d need to set the disabled attribute of the radio fields.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Disable level 1 of taxonomies’ is closed to new replies.