我想排除下面代码中调用的一种技能类型,这可能吗?
<ul>
<li><a href="#" class="all active"><?php _e('All', 'framework'); ?></a><span>/</span></li>
<?php
wp_list_categories(array(
'title_li' => '',
'taxonomy' => 'skill-type',
'walker' => new Portfolio_Walker(),
'show_option_none' => ''
));
?>
</ul>
答案 0 :(得分:1)
您检查了Documentation吗?
您可以使用exclude参数定义以逗号分隔的术语ID列表:
<?php
wp_list_categories(array(
'title_li' => '',
'taxonomy' => 'skill-type',
'exclude' => '1,2,3,4', //Whatever IDs of the terms you want to exclude
'walker' => new Portfolio_Walker(),
'show_option_none' => ''
));
?>