Created
February 20, 2013 15:30
-
-
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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