WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get tag template

Description

Retrieve path of tag template in current or parent template.

Works by first retrieving the current tag name, for example 'tag-wordpress.php', then trying tag ID, for example 'tag-1.php', and will finally fallback to 'tag.php' template, if those files don't exist.

Usage

<?php get_tag_template() ?>

Parameters

None.

Return Values

(string) 

Examples

Notes

Filters

  • 'tag_template':
    apply_filters('tag_template', $template)

Change Log

Since: 2.3.0

Source File

get_tag_template() is located in wp-includes/template.php.

Related

See also index of Function Reference and index of Template Tags.