使用get_terms() 以及parent 论点
“parent”(int | string)要检索的直接子项的父项ID。
$parent_term_id = 123;
$direct_child_terms = get_terms( array(
\'taxonomy\' => \'[taxonomy]\',
\'parent\' => $parent_term_id,
) );
别忘了更换
[taxonomy] 无论分类法是什么;e、 g。,
post_tag,
product_cat, 等等,进一步定制的附加参数
here.