Skip to content

Instantly share code, notes, and snippets.

@trentsnippets
Created September 4, 2013 22:57
Show Gist options
  • Save trentsnippets/6443933 to your computer and use it in GitHub Desktop.
Save trentsnippets/6443933 to your computer and use it in GitHub Desktop.
Wordpress - Show the current template name you are working on..
<?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