Title: Dependent Dropdowns in Custom Posts
Last modified: August 19, 2016

---

# Dependent Dropdowns in Custom Posts

 *  Resolved [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/dependent-dropdowns-in-custom-posts/)
 * Hello,
 * So I got an issue that I need some help with.
 * I have created a custom post type and a taxonomy for it. Here is an example of
   the taxonomy hierarchy.
 * – A
    – – 1A – – 2A – – 3A – B – – 1B – – 2B – – 3B
 * Its pretty standard. When I add a new custom post I want to display two drop 
   down boxes for the user to choose taxonomy categories from. It’s basically rebuilding
   the wordpress categories box except with dropdowns.
 * I have been using wp_list_categories to display the drop down box but here is
   my issue.
 * The first drop down box will display the parent categories with a depth of 1 
   and the second drop down box should show the sub categories of whatever category
   the user previously chooses. I have had no luck getting this to work.
 * How can something like this be accomplished?

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

 *  Thread Starter [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/dependent-dropdowns-in-custom-posts/#post-1766268)
 * .. anyone?
 *  Thread Starter [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/dependent-dropdowns-in-custom-posts/#post-1766319)
 * I solved my problem using javascript with XMLHttpRequest
 * this tutorial helped me out a lot.
    [http://www.w3schools.com/PHP/php_ajax_database.asp](http://www.w3schools.com/PHP/php_ajax_database.asp)

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

The topic ‘Dependent Dropdowns in Custom Posts’ is closed to new replies.

## Tags

 * [custom posts](https://wordpress.org/support/topic-tag/custom-posts/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)
 * [wp_list_categories()](https://wordpress.org/support/topic-tag/wp_list_categories/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [fatalx](https://wordpress.org/support/users/fatalx/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/dependent-dropdowns-in-custom-posts/#post-1766319)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
