How to Show Empty Categories in Wordpress 2.7
Here’s an update of how to show empty categories using the default Category widget in Wordpress 2.7. My previous post was for pre-2.7 Wordpress sites, this update is still simple; actually it’s easier since Wordpress switched to using an array for the category arguments.
In your includes/widget.php file around line 1090, change this line:
$cat_args = array(’orderby’ => ‘name’, ’show_count’ => $c, ‘hierarchical’ => $h);
to:
$cat_args = array(’orderby’ => ‘name’, ’show_count’ => $c, ‘hierarchical’ => $h, ‘hide_empty’ => ‘0′);
Click here to see the hack for pre-2.7 versions.
Related posts:

January 18th, 2009 at 6:47 am
what file are you editing?
January 18th, 2009 at 12:09 pm
@jer - the file to edit is /includes/widgets.php
January 24th, 2009 at 1:50 pm
thak you!
note: the files name is widgets with “s” at the end.
May 28th, 2009 at 3:09 am
I was reading your blog post and I was wondering if it’s possible to have the all categories displayed with drop downs for their inner categories.
Great Blog - Cool trick, have a great day.
~Swany