Support

Account

Home Forums General Issues Filter specific parent/child categories

Unread

Filter specific parent/child categories

  • Hi, I’m building a site with an extensive category setup while trying to keep everything vanilla, so no custom taxonomies, and I’d like to present my user the option to first choose a parent category (within just a manually built checkbox field type) and based on that selection choose one or more it’s children without displaying the entire hierarchy of all the categories. Can this be done with the Taxonomy Field type and this filter?

    add_filter('acf/fields/taxonomy/wp_list_categories', 'my_taxonomy_args', 10, 2);
    
    function my_taxonomy_args( $args, $field )
    {
        // do stuff to $args
        return $args;
    }
Viewing 1 post (of 1 total)

The topic ‘Filter specific parent/child categories’ is closed to new replies.