WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
up vote 3 down vote accepted

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

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

Codex: wp_list_categories()

share|improve this answer

Actually hide_empty needed a numerical value for me so

'hide_empty' =>0

worked for me

share|improve this answer
it makes no difference if hide_empty is set with false or 0 : see core.trac.wordpress.org/browser/tags/3.9.1/src/wp-includes/… – Michal Mau Jun 9 '14 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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