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′);

wp-hack

Click here to see the hack for pre-2.7 versions.

Related posts:

  1. How to show empty categories in Wordpress using the default category widget
  2. How to Exclude Category Posts from your Wordpress Homepage
  3. Post from Wordpress to Facebook
  4. How to manually change your Wordpress theme


4 Responses to “How to Show Empty Categories in Wordpress 2.7”

Leave a Reply