Force categories widget to show empty cats

This snippet uses a Filter to add default args to the wp_list_categories call that is made when the “Categories” widget is rendered on the front end.

It is particularly useful for forcing the display of Category link even if they have no posts in them, since that is not something you can just check/uncheck on the Widgets page. For the full list of default args for wp_list_categories , check out the WP Codex.

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!