Ticket #685 (closed defect (bug): fixed)
wp_list_cats() leaves out categories
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Template | Version: | 1.5 |
| Severity: | minor | Keywords: | bg|2nd-opinion |
| 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
- Keywords bg|2nd-opinion added
- Owner changed from anonymous to skippy
- Status changed from new to assigned
Is this still a problem?
comment:3
markjaquith — 7 years ago
This might have fixed it: http://trac.wordpress.org/changeset/873
- Status changed from assigned to closed
- Resolution set to fixed
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.
