W3cubDocs

/WordPress

apply_filters( 'template_include', string $template )

Filters the path of the current template before including it.

Parameters

$template

(string) The path of the template to include.

More Information

This filter hook is executed immediately before WordPress includes the predetermined template file. This can be used to override WordPress’s default template behavior.

Source

File: wp-includes/template-loader.php

View on Trac

Changelog

Version Description
3.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/template_include