This is the thing I want to do, PLEASE HELP ME!
I have a post-type name “Program” and “Curse” and both have a hierarchical configuration for a taxonomy named “Ubication”, it has something like this:
Guatemala
-Guatemala City
-Mixco
Sacatepequez
-Antigua Guatemala
-San Bartolomé
I want a select field with the main tax terms i.e.(Guatemala and Sacatepequez)I got it with get_terms()
;
Now I want to concatenate this main terms with their respective children, for example, if I choose “Guatemala”, the second select will be auto-populate with Guatemala’s children terms (Guatemala City, Mixco). So the deal is that I can’t show the children terms.
I’m trying to use get_term_children()
, but I don’t know how to use it and how to get the term ID.
Please help me! ??