Created
December 3, 2014 18:31
-
-
Save ericrasch/a1c993ac4312eaf9455f to your computer and use it in GitHub Desktop.
Detect + display WordPress template file being used
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
<?php | |
/** | |
* Detect + display WordPress template file being used | |
* REF: http://www.wpmayor.com/output-name-of-wordpress-template-file-being-used/#comment-8221 | |
*/ | |
add_action('wp_head', 'show_template'); | |
function show_template() { | |
global $template; | |
global $current_user; | |
get_currentuserinfo(); | |
if ($current_user->user_level == 10 ) print_r($template); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment