As, we know that WordPress does not show empty categories in by default category widget. However, It can be easily solved by programmers. You just need to add the following code to your functions.php file, which is located inside your theme directory. The below code will force the WordPress category widget to display empty categories.
//Show empty categories in category widget
add_filter('widget_categories_args','show_empty_categories');
function show_empty_categories($cat_args){
$cat_args['hide_empty'] = 0;
return $cat_args;
}
Empty Categories in WordPress Category Widget
Follow the Below Code :-//Show empty categories in category widget
add_filter('widget_categories_args','show_empty_categories');
function show_empty_categories($cat_args){
$cat_args['hide_empty'] = 0;
return $cat_args;
}
0 comments:
Post a Comment