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

I have created a front end post with a form and I would like to have several categories for the user to choose between. But the problem is that the dropdown category only show those categories that are in use. I need it to show all categories even if they are not in use.

The code I'm using is following:

wp_dropdown_categories(   'show_option_none=Kategori&tab_index=4&taxo. nomy=register_vote_category' );
share|improve this question
Are you using wp_dropdown_categories – Pieter Goosen Jun 3 '14 at 10:02
Yes, I forgot to say that. I'm currently using <p><?php wp_dropdown_categories( 'show_option_none=Kategori&tab_index=4&taxonomy=register_vote_category' ); ?></p> – Adam Lundberg Jun 3 '14 at 10:06
You should add this info in an edit – Pieter Goosen Jun 3 '14 at 10:14
up vote 1 down vote accepted

wp_dropdown_categories() has a parameter specially to hide or to show empty categories.


(boolean) (optional) Show (0/False) or hide (1/True) category with no posts.

Default: 1/True

You can simply just


to your arguments

share|improve this answer
+1 This is most likely what the OP is looking for. I misread the question and thought he only wanted to show the empty categories ;-) ps You wrote wp_list_categories instead of wp_dropdown_categories. – birgire Jun 3 '14 at 10:24
I got it working, thanks! – Adam Lundberg Jun 3 '14 at 10:32
@birgire thanks, typo – Pieter Goosen Jun 3 '14 at 12:01

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.