Fires before determining which template to load.
exit()
(or die()
), no subsequent template_redirect hooks will be run, which could break the site’s functionality. Instead, use the template_include
filter hook to return the path to the new template you want to use. This will allow an alternative template to be used without interfering with the WordPress loading process.Version | Description |
---|---|
1.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/template_redirect