I have a site with a custom post type called questions and a hierarchical custom taxonomy called agencies. A question will always belong to a subcategory of an agency. There is a URL re-write that inserts /knowledge-center/agencies/ before the taxonomy term.
The archive page for the agency taxonomy term works:
and the individual question pages properly insert the hierarchy of the taxonomy:
However the archive page for the taxonomy sub term 404’s:
When I look at the page using Query Monitor, the matched rule appears to be:
And it’s looking for the basic page template.
Basically it’s dropping the /agencies part of the URL rewrite for the taxonomy sub term. Although it’s properly working for the taxonomy term:
And pulling the /taxonomy-agencies.php template.
Don’t know why the sub term query isn’t working, but it’s driving me insane.
Read more here: WordPress Custom Hierarchical Taxonomy Archive page problem