Codex

Function Reference/get page template

Contents

Description

Retrieve path of page template in current or parent template.

First attempt is to look for the file in the '_wp_page_template' page meta data. The second attempt, if the first has a file and is not empty, is to look for 'page.php'.

Usage

<?php get_page_template() ?>

Parameters

None.

Return Values

(string) 
Returns path of page template in current or parent template.

Examples

Notes

Change Log

Since: 1.5.0

Source File

get_page_template() is located in wp-includes/theme.php.

Related

See also index of Function Reference and index of Template Tags.