2

Is there a way to show a list of all categories available even if there are no posts associated with them. So if there is a post in that category then it echos a link and if not it just echos out the name of the category?

I'm using wp_list_categories() to show them...

5

There's an argument called hide_empty which is true by default.

$args = array('hide_empty' => FALSE);
wp_list_categories($args);

Codex: wp_list_categories()

0

Actually hide_empty needed a numerical value for me so

'hide_empty' =>0

worked for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.