[wp-trac] [WordPress Trac] #13176: wp_list_categories pad_counts shows zero for parent term with custom hierarchical taxonomy

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 29 12:14:47 UTC 2010


#13176: wp_list_categories pad_counts shows zero for parent term with custom
hierarchical taxonomy
--------------------------+-------------------------------------------------
 Reporter:  michaelh      |       Owner:  filosofo
     Type:  defect (bug)  |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  Taxonomy      |     Version:  3.0     
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 When asked to "pad_counts", this version of wp_list_categories returns
 zero for parent terms when using a custom hierarchical taxonomy:

 {{{
 <?php
 $orderby = 'name';
 $show_count = 1;
 $pad_counts = 1;
 $hierarchical = 1;
 $taxonomy = 'genre';
 $title = '';
 $args = array(
   'orderby' => $orderby,
   'show_count' => $show_count,
   'pad_counts' => $pad_counts,
   'hierarchical' => $hierarchical,
   'taxonomy' => $taxonomy,
   'title_li' => $title
 );
 ?>
 <ul>
 <?php
 wp_list_categories($args);
 ?>
 </ul>
 }}}

 With $taxonomy = 'category', the pad_counts are correct.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13176>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list