Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$type}_template

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
50       * This hook also applies to various types of files loaded as part of the Template Hierarchy.
51       *
52       * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
53       * 'embed', home', 'frontpage', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
54       *
55       * @since 1.5.0
56       *
57       * @param string $template Path to the template. See locate_template().
58       */
59      return apply_filters( "{$type}_template", $template );
60 }
61
62 /**
63  * Retrieve path of index template in current or parent template.
64  *
65  * The template hierarchy is filterable via the {@see 'index_template_hierarchy'} hook.
66  * The template path is filterable via the {@see 'index_template'} hook.
67  *
68  * @since 3.0.0