Title: wp_dropdown_categories
Last modified: August 20, 2016

---

# wp_dropdown_categories

 *  Resolved [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * (@joshrodgers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/)
 * I am using wp_dropdown_categories ([http://codex.wordpress.org/Function_Reference/wp_dropdown_categories](http://codex.wordpress.org/Function_Reference/wp_dropdown_categories))
   to display a dropdown menu for my site. I have a ton of categories and only need
   the dropdown for one or two of them. However, as the codex indicates, there is
   only an exclude feature. I know there has to be some kind of function or something
   I can use for an “include” option.
 * My code looks like:
 * [http://pastebin.com/atrqWwdD](http://pastebin.com/atrqWwdD)
 * Anyone have any ideas?
 * Thanks,
    Josh

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712811)
 * have you tried to use ‘include’ even if it is not explicitely mentioned in the
   codex or the core file?
 * somewhere down the line, this functions uses ‘get_terms()’ which supports ‘include’…
 *  Thread Starter [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * (@joshrodgers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712840)
 * alchymyth,
 * I just tried it a few minutes ago and it doesn’t work 🙁 However, I’m glad you
   mentioned that, hadn’t thought to try it and see 🙂
 * Thanks,
    Josh
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712842)
 * too bad – seems to work with the default taxonomy ‘category’:
 * `wp_dropdown_categories('taxonomy=category&id=make&show_option_all=Select Make...&
   include=9,1');`
 * I don’t have any cusotm taxonomes set up at the moment to test further.
 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712844)
 * Hi Josh,
    I think you would create your own category dropdown and use [get_categories()](http://codex.wordpress.org/Function_Reference/get_categories)
   wich has the ‘include’ argument.
 * I use categories dropdown in [this child theme](http://digitalraindrops.net/2011/10/twenty-eleven-page-of-posts-extended/),
   you can get an example in the download, /inc/[pop-meta-functions.php code](http://pastebin.com/hT1PctEA),
   line 64 you would need to add the ‘include’, the dropdown is lines 90-103
 * Thinking a little “outside the box” if the theme supports custom menus create
   a custom menu and add the categories, in code call the menu with [wp_get_nav_menu_items()](http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items?#examples)
   adding these into a select dropdown, much cleaner and loads more control.
 * HTH
 * David
 *  Thread Starter [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * (@joshrodgers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712916)
 * David,
 * That’s a great idea, I’ll definitely use get_categories instead of wp_dropdown_categories!
 * Thanks,
    Josh

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wp_dropdown_categories’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/wp_dropdown_categories-4/#post-2712916)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
