Codex tools: Log in
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'.
<?php get_page_template(); ?>
Displays the filename of the page template used to render a Page (printed within an HTML comment, in this example) :
<?php echo '<!-- ' . basename( get_page_template() ) . ' -->'; ?>
get_page_template() is located in