Support

Account

Home Forums General Issues about displaying list of childrens in taxonomy field

Unread

about displaying list of childrens in taxonomy field

  • i am able to dispplay all the parents like this
    //category manipulation for material and thickness at feaure page
    function feature_hide_child_taxonomies($args, $field){
    if (‘feature_product_select_material’ === $field[‘_name’]) {
    $args[‘parent’] = 0;
    }
    return $args;
    }
    add_filter(‘acf/fields/taxonomy/query’, ‘feature_hide_child_taxonomies’, 10, 2);
    now I want all childrens only but I am unable. please view my other code
    function feature_show_parent_taxonomies($args, $field, $post_id){
    $parent_id = get_field(‘feature_product_radio_size’,$post_id )[‘feature_product_select_material’];

    if (‘feature_product_select_thickness’ === $field[‘_name’]) {

    }
    return $args;
    }

    add_filter(‘acf/fields/taxonomy/query’, ‘feature_show_parent_taxonomies’, 10, 2);

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.