Support

Account

Home Forums ACF PRO Categories parents in taxonamy Reply To: Categories parents in taxonamy

  • I found this helping to select parent categories

    function my_taxonomy_query( $args, $field, $post_id ) {
        // modify args
        $args['parent'] = 0;
        // return
        return $args;
    }
    
    add_filter('acf/fields/taxonomy/query', 'my_taxonomy_query', 10, 3);

    Image example: http://prntscr.com/e5i7a7

    I created another custom field to select the child category, but how would it work?