Make WordPress Core

Opened 20 years ago

Closed 19 years ago

Last modified 10 years ago

#2710 closed defect (bug) (fixed)

list_cats / wp_list_cats: hide_empty does not hide cats with non-empty sub-cats

Reported by: janX Owned by:
Priority: normal Milestone: 2.3
Component: Template Version: 2.0.2
Severity: normal Keywords: list_cats wp_list_cats hide_empty
Cc: Focuses:

Description

I'd like for the hide_empty options in list_cats and wp_list_cats to NOT hide categories which are empty, but that have sub-categories that have posts in them. Looking at the code it is obvious why this happens (template-functions-category.php, line 322). I have a fix for this, though.

Attachments (1)

template-functions-category.php.diff​ (804 bytes ) - added by janX 20 years ago.
Diff to release version 2.0.2 of the file

Download all attachments as: .zip

Change History (5)

@janX
20 years ago

Diff to release version 2.0.2 of the file

#1 @matt
20 years ago

  • Milestone 2.1 → 2.2

#2 @foolswisdom
20 years ago

  • Milestone 2.2 → 2.3

#3 @ryan
19 years ago

  • Resolution → fixed
  • Status new → closed

This ticket was mentioned in ​Slack in #forums by sergey. ​View the logs.


10 years ago

Note: See TracTickets for help on using tickets.