function get_taxonomy_template() {}

Retrieve path of taxonomy template in current or parent template.
Retrieves the taxonomy and term, if term is available. The template is prepended with ‘taxonomy-‘ and followed by both the taxonomy string and the taxonomy string followed by a dash and then followed by the term.

Source code

function get_taxonomy_template() {

	$term = get_queried_object();

	$taxonomy = $term->taxonomy;

	$templates = array();

	$templates[] = "taxonomy-$taxonomy-{$term->slug}.php";


No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: