I've got a vexing how-to that I've not found any help on. I have a custom post type that has a custom field with a date in it (format: yyyy-mm-dd-t). When a post is published or edited, I would like to have a function that automatically populates a hierarchical taxonomy with the year and date.
So for example, if I entered "2003-03-15-1" into the custom date field, I would like it to include the custom taxonomy "2003" and its child taxonomy "03". But while I've seen code that will populate the parent taxonomy, I've not found anything that tells me how to populate the parent and the child.
Surely such a thing is possible, right?
2003-03
and2004-03
will require that one of the03
terms have something unique appended. But disregarding that, can I ask why you need to do this? Perhaps the end result you'd like to achieve can be accomplished with the already-existing meta data, since posts can be queried and sorted on that data.