Use in functions php. It outputs the name of the template file being used to display the current page. add_action('wp_head', 'show_template'); function show_template() { global $template; print_r($template); }