How to show empty categories in the WordPress category widget

edwin

Newbie
Sep 28, 2017
35
2
8
Hi all,

By default, WordPress does not show empty categories in the category widget, but some times when, especially as a developer, you need to show categories, even if they are "still" empty.

Well, It is very easy to show the categories in the widget, you just have to add this code into the functions.php file of your theme.
You don't have permission to view the spoiler content. Log in or register now.

That’s all, you can now drag and drop categories widget to any sidebar or widget ready area on your WordPress site. The category widget will now display empty categories as well.
 

Advertisement

Top