Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 如何删除“;类别“;wp_列表_类别()顶部的标题;输出_Wordpress_Wp List Categories - Fatal编程技术网

Wordpress 如何删除“;类别“;wp_列表_类别()顶部的标题;输出

Wordpress 如何删除“;类别“;wp_列表_类别()顶部的标题;输出,wordpress,wp-list-categories,Wordpress,Wp List Categories,我使用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_typ

我使用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 ); ?>

所以输出是这样的:

这给了我•按位置浏览下的类别:


如何删除它?

尝试将
'title\u li'=>'',
添加到$args数组中



我已经用完整的代码更新了我的评论。我在自己的安装中尝试了它,它按照您的要求删除了“类别”部分。谢谢,我现在明白了,我只是将我的全部代码放入
    中,然后它就处于相同的结构中。谢谢你是对的。
    <?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 ); ?>