[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
Tue Sep 11 13:44:40 UTC 2012


#13176: wp_list_categories pad_counts shows zero for parent term with custom
hierarchical taxonomy
-------------------------------+-------------------------
 Reporter:  michaelh           |       Owner:  filosofo
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Taxonomy           |     Version:  3.0
 Severity:  normal             |  Resolution:  worksforme
 Keywords:  reporter-feedback  |
-------------------------------+-------------------------

Comment (by SergeyBiryukov):

 I can reproduce valendesigns' example from comment:8.

 1. Created the structure:
 {{{
 Cat 1 (0 posts, ID 66)
 — sub cat 1 (1 post, ID 67)
 — — sub sub cat 1 (1 post, ID 76)
 }}}
 2. `wp_list_categories( 'show_count=1&pad_counts=1' )` displays:
 {{{
 Cat 1 (2)
     sub cat 1 (2)
         sub sub cat 1 (1)
 }}}
 3.
 `wp_list_categories('include=66&show_count=1&pad_counts=1&hide_empty=0')`:
 {{{
 Cat 1 (0)
 }}}

 When `include` is specified, `pad_counts` only applies to the categories
 that are explicitly included.

 Not sure if that's a bug or expected behaviour though.

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


More information about the wp-trac mailing list