Programmatically creating taxonomies seems to be a point that comes up now and again for those who are building solutions for others on WordPress.
Taxonomies themselves can even be a little confusing; however, I’ve found that the following usually helps to solidify the concept a bit:
Hierarchical taxonomies are analogous to categories; non-hierarchical taxonomies are analogous to tags.
But still, let’s say that you’re creating a solution for someone such that you need to import information as a post and apply a taxonomy to it. Further, perhaps you want to apply a parent taxonomy to the post, as well.
How can we do that?