Advertisements

get_taxonomy_template

Definition:
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";

1735

Advertisements

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:

WordPress.com Logo

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

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: