Web Hosting Forum - Net Hosting Talk

We are a community of individuals and businesses passionate about web hosting. Let's build, learn, and grow together.

How to show empty categories in the WordPress category widget


Junior Member
Hi all,

By default, WordPress does not show empty categories in the category widget, but sometimes, especially as a developer, you must show categories, even if they are "still" empty.

Well, It is straightforward to show the categories in the widget. You must add this code to your theme's functions.php file.
You don't have permission to view the spoiler content. Log in or register now.

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