Make WordPress Core

Opened 22 years ago

Closed 20 years ago

#685 closed defect (bug) (fixed)

wp_list_cats() leaves out categories

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

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
22 years ago

  • PatchNo

#2 @skippy
21 years ago

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

Is this still a problem?

#4 @mdawaffe
20 years ago

  • Resolutionfixed
  • Status assignedclosed

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.