I've created my own custom taxonomy called kernal-category using the CPT UI plugin. This taxonomy is hierarchical and will have a large number of secondary, and tertiary categories.
Currently, to load the correct posts linked to the taxonomy terms I have created individual content-child pages for each term.
Example; the term news has a page of taxonomy-kernal_category-news.php
These are called from my
archive.php page using the standard
get_template_part( 'content-child', get_post_format() );
Each of these pages are identical in layout and design apart from the header on each page which should match the taxonomy term.
I'm going to be creating a lot of terms and that would lead to a lot of individual, duplicate pages which feels unnecessary.
Is there a way I can use a single template and somehow take the taxonomy term from the url, use it as a variable and then load the same page with my header text based on the variable? Or obviously a smarter, alternative.