I am using a large number of custom taxonomies. My post type is called “location” and there is a parent term “Asia” and a subterm “Thailand”.
Now I created the taxonomy archive template files according to the WordPress Codex, which is working in the following format:
taxonomy-location-Thailand.php (see codex for taxonomy-$taxonomy-$term.php)
After that my permalinks will look like following:
As Thailand is a subterm of Asia, I need the parent term also included, like following:
Anybody knows how to include a redirect for all subterms to have their parent terms included in the permalinks?
As I am having a large number of taxonomies, I need this working in one function, and not seperated for each single term.
Read more here: Rewrite rules for subterms in custom taxonomies