New answers tagged hierarchical
I got the solution (based on the tutsplus tutorial link above) that deals with actual checkboxes here to work: http://wordpress.org/support/topic/display-tag-admin-box-like-categories-without-hierarchy it ignores the "most used" tab of the metabox that the tutsplus link addresses but personally I'm keeping it simple.
Since wp_set_post_terms() does not accept hierarchy for it, you will first have to check if terms exist already, create them using wp_insert_term() if not and only then assign to post. Note that there had been (don't know current state) some cache related bugs with doing such things on the fly, see Inserting terms in an Hierarchical Taxonomy
I realise this is a very old question, but if you have a need to build up an actual structure of terms, this might be a useful method for you: /** * Recursively sort an array of taxonomy terms hierarchically. Child categories will be * placed under a 'children' member of their parent term. * @param Array $cats taxonomy term objects to sort * ...
Top 50 recent answers are included