WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
Looking at the hierarchy diagram indeed the post_type archive is above the taxonomy however aren’t they parallel and isn’t taxonomy-term-archive more specific?
ctax2=term1_of_ctax2 &ctax1=term1_of_ctax1 &post_type=cpt1 &taxonomy=ctax2 &term=term1_of_ctax2
With the matched_query including specific
term query_vars the template hierarchy list from Query monitor does include
taxonomy-ctax2-term1_of_ctax2.php however the actual page is rendered using the post_type
My confusion arises because in the
template-loader.php "tax" is processed after post_type_archive which I believe would mean that tax template should be take precedence over post_type_archive right?
Query monitor template results:
taxonomy-ctax2-term1_of_ctax2.php taxonomy-ctax2.php taxonomy.php archive-cpt1.php archive.php index.php