Skip to content

Instantly share code, notes, and snippets.

@philsinatra
Created February 20, 2013 15:30
Show Gist options
  • Save philsinatra/4996357 to your computer and use it in GitHub Desktop.
Save philsinatra/4996357 to your computer and use it in GitHub Desktop.
http://www.wpmayor.com/wordpress-hacks/output-name-of-wordpress-template-file-being-used/ This is a handy function which I tend to use from time to time when debugging my blogs, it outputs the name of the template file being used to display the current page. Just paste the following into your functions.php file:
add_action('wp_head', 'show_template');
function show_template() {
global $template;
print_r($template);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment