I have four different taxonomy terms defined in my wordpress theme which are
- Continents
- Countries
- States
- Cities
My problem is that I am not able to figure out how can I make it possible for user to specify parent-child relationship in terms of different taxonomy. for example, if user adds 'Asia' under continents, 'India' under country, 'Delhi' under state and 'New Delhi' under city, how to specify India as child of Asia, Delhi as child of India and New Delhi as child of Delhi Please help me. thanks.
code for custom taxonomy is this: `
add_action('init', 'register_my_taxes_states');
function register_my_taxes_states() {
register_taxonomy( 'states',
array (
0 => 'schools',
1 => 'universities',
2 => 'institutes',
3 => 'colleges',
),
array( 'hierarchical' => true,
'label' => 'states',
'show_ui' => true,
'query_var' => true,
'show_admin_column' => false,
'labels' => array (
'search_items' => 'state',
'popular_items' => '',
'all_items' => '',
'parent_item' => '',
'parent_item_colon' => '',
'edit_item' => '',
'update_item' => '',
'add_new_item' => '',
'new_item_name' => '',
'separate_items_with_commas' => '',
'add_or_remove_items' => '',
'choose_from_most_used' => '',
)
) );
}
`