Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#685 closed defect (bug) (fixed)

wp_list_cats() leaves out categories

Reported by: steph-tara's profile steph-tara Owned by: skippy's profile skippy
Milestone: Priority: normal
Severity: minor Version: 1.5
Component: Template Keywords: bg|2nd-opinion
Focuses: Cc:

Description

wp_list_cats() seems to make the assumption that the parent category has an ID which is lower than its children's. This is not always true. The algorithm used to retrieve cats causes some of them to be left out (in my case, I ended up with 20 cats out of my 70 or so).

passing arguments in the function, however, solves the problem: wp_list_cats('hide_empty=0&sort_column=name') shows all my cats.

It would be nice to have the "default" behaviour of the function not risk leaving out categories from people's listings.

Change History (4)

#1 @steph-tara
19 years ago

  • Patch set to No

#2 @skippy
19 years ago

  • Keywords bg|2nd-opinion added
  • Owner changed from anonymous to skippy
  • Status changed from new to assigned

Is this still a problem?

#4 @mdawaffe
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

It is not the case that WP assumes a category has a higher ID than its parent. That was either never the problem or has been fixed.

#4104 fixes the hide_empty problem seen when empty parents have nonempty children.

Note: See TracTickets for help on using tickets.