Skip to content

Instantly share code, notes, and snippets.

@zenman
Last active December 23, 2015 05:18
Show Gist options
  • Save zenman/6585624 to your computer and use it in GitHub Desktop.
Save zenman/6585624 to your computer and use it in GitHub Desktop.
Add a bar at the bottom of the page that shows the template being used. Simply add to your functions.php file and comment out when done with it.
/*
* Add a bar at the bottom of the page that shows the template being used.
*/
function show_template() {
global $template;
$style = '
background-color:rgba(0,0,0,1);
position:fixed;
bottom:0;
right:0;
left:0;
color:#fff;
opacity:.2;
padding:.5em;
font-size:.6em;
';
echo '<div style="'.$style.'">'.$template.'</div>';
}
add_action('wp_footer', 'show_template');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment