Web Hosting Forum - Explore the Latest in Web Hosting Discussions

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

edwin

Junior Member
Moderator
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. 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

    Back
    Top