Created
September 4, 2013 22:57
-
-
Save trentsnippets/6443933 to your computer and use it in GitHub Desktop.
Wordpress - Show the current template name you are working on..
This file contains hidden or 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 | |
/* Display current template you are using | |
* Add to functions.php | |
*/ | |
add_action('wp_head', 'display_template'); | |
function display_template() { | |
global $template; | |
$filename = basename($template); | |
echo '<strong> Current Template is: '.$filename.'</strong>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment