theme_page_templates WordPress Filter Hook
The theme_page_templates hook allows you to add custom page templates to your theme. This hook is called when the page template dropdown is rendered on the page edit screen.
apply_filters( 'theme_page_templates', array $page_templates , WP_Theme $this , WP_Post|null $post ) #
Filters list of page templates for a theme.
Contents
Parameters
Source
Changelog
Version | Description |
---|---|
4.4.0 | Converted to allow complete control over the $page_templates array. |
3.9.0 | Introduced. |