$term_id = $current_term_id;
$args = array(
\'hierarchical\' => 1,
\'taxonomy\' => \'portfolio_category\',
\'hide_empty\' => 0,
\'parent\' => 6,
);
$categories = get_categories($args);
foreach($categories as $category) {
if( $term_id != $category->cat_ID){
continue;
}
echo \'<a href="\' . get_category_link($category->cat_ID) . \'" title="\' . $category->name . \'">\' . $category->name . \'</a><br>\';
}
我假设您在变量$current\\u term\\u id中有当前投资组合类别。但是,如果您没有当前类别id,并且您在存档页中,则可以使用get\\u queryed\\u object()获取它