Banner
WordPress Tutorials

How to Show Empty Categories in WordPress Widgets

By default the WordPress category widget does not show empty categories. Today i will show you how to display empty categories in WordPress widgets.

How to Show Empty Categories in WordPress Widgets

First thing you need to do is add this simple code snippet in your child theme‘s functions.php file or a site specific plugin.

add_filter( 'widget_categories_args', 'wpb_force_empty_cats' );
function wpb_force_empty_cats($cat_args) {
$cat_args['hide_empty'] = 0;
return $cat_args;
}

 

Article written by dudecmsadmin

dudecmsadmin

Hi there! I`m admin of Cmsdude.org community where I share everything from web. Im interested more in webdesign.

This Post Has One Comment

  1. Johnd884 Reply

    I went over this site and I conceive you have a lot of wonderful information, bookmarked . ebgecaecagag

Leave a Reply

Your email address will not be published. Required fields are marked *

Banner
Time for ThemeForest Amaze, common guys, we can do this in half day!
Open