Filters the path of the current template before including it.
Parameters
$templatestring- The path of the template to include.
Source
$template = apply_filters( 'template_include', $template );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
| CARVIEW |
Filters the path of the current template before including it.
$templatestringThis filter hook is executed immediately before WordPress includes the predetermined template file. This can be used to override WordPress’s default template behavior.
$template = apply_filters( 'template_include', $template );
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
This example includes a new template on a page called ‘portfolio’ if the new template file was found.