Tag: wp_list_categories

How to Exclude Empty WordPress Categories

  • 8 Comments

By default, ClassiPress includes listing all categories so your site visitors are able to post a new ad and place it in a category even if it’s empty. Otherwise, they wouldn’t even know the category exists and it’s pointless to even have it. With that being said, a couple of you have asked me how to remove empty categories from the ClassiPress navigation which is actually quite easy.

wp_list_categories-example

ClassiPress uses the standard WordPress function wp_list_categories which allows you to pass certain parameters into it and alter the results. All of the parameters have certain default values if you don’t pass anything into the function it just uses the defaults.

Read more