How can I display parent and child taxonomies in separate drop downs?

Hello Everyone out there, who are facing difficulty to display the parent and child taxonomies in drop down, i found the solution for the above problem……

edit the code in the functions.php file,

before the code was

$categories=  get_categories('child_of=".$_POST["main_catid'].'hide_empty=0');

now edit the code, like this…

$categories=  get_categories('child_of=".$_POST["main_catid'].'&hide_empty=0'.'&taxonomy=state');

and this works so beautifully, try it for sure……all i did was i concatenated the taxonomy, that’s all

cheers everyone, happy coding….. 🙂

Leave a Comment

tech