get_page_template
get_page_template ( No parameters )
See:Returns:- (string) Full path to page template file.
Defined at:Change Log: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Retrieves path of page template in current or parent template.Note: For block themes, use locate_block_template() function instead.
The hierarchy for this template looks like:
1. {Page Template}.php
2. page-{page_name}.php
3. page-{id}.php
4. page.php
An example of this is:
1. page-templates/full-width.php
2. page-about.php
3. page-4.php
4. page.php
The template hierarchy and template path are filterable via the {@see '$type_template_hierarchy'}
and {@see '$type_template'} dynamic hooks, where `$type` is 'page'.