WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 a grand-parent-category with several parent-category. Each groundchild means a specific method to process later. Parents should not be selected, it merely means to group the children together.

I use wp_dropdown_categories with child_of to show the dropdown form. The parents shows up as a choice which can course confusing for users.


If I add exclude = $parent_ids, the whole dropdown list gone.

wp_dropdown_categories('child_of'=>$groun_parent_id,'exclude'=>$parent_ids );

I can throw error message or process to a default value if a user choosed a parent, but this is a way to frustrat my users. Is there any other way to make a dropdown without parent?

share|improve this question

the easiest solution for you , providing you do not have 200 categories, is to use the exclude AND include parameters together . Alternatively , you can construct your own list with get_categories. or use the exclude_tree .

share|improve this answer

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.