Question

I called my custom taxonomy category using wp_list_categories(); Like this :

<?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 ); ?>

So the output is like it : enter image description here

This is giving me •Categories just under Browse by Locations :

How to remove that ?

Was it helpful?

Solution

Try to add 'title_li' => '', to your $args array.

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 ); ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top