我使用 wp_list_categories(); 调用我的自定义分类法类别,如下所示:
<?php
$post_type = 'listing';
$taxonomy = 'listings_categories';
$orderby = 'ASC';
$show_count = 1;
$hide_empty = 0;
$pad_counts = 0;
$hierarchical = 1;
$args = array(
'post_type' => $post_type,
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'show_count' => $show_count,
'hide_empty' => $hide_empty,
'pad_counts' => $pad_counts,
'hierarchical' => $hierarchical
);
?>
<?php wp_list_categories( $args ); ?>
所以输出就像它:
这给了我•按地点浏览的类别:
如何删除?
答案 0 :(得分:2)
尝试将'title_li' => '',
添加到$ args数组中。
http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_or_Hide_the_List_Heading
<?php
$post_type = 'listing';
$taxonomy = 'listings_categories';
$orderby = 'ASC';
$show_count = 1;
$hide_empty = 0;
$pad_counts = 0;
$hierarchical = 1;
$args = array(
'post_type' => $post_type,
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'show_count' => $show_count,
'hide_empty' => $hide_empty,
'pad_counts' => $pad_counts,
'hierarchical' => $hierarchical,
'title_li' => ''
);
?>
<?php wp_list_categories( $args ); ?>