Created
July 16, 2013 16:27
-
-
Save decodigo/6010290 to your computer and use it in GitHub Desktop.
Snippet to show which template is currently being used.
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 | |
add_action('wp_footer', 'show_template'); | |
function show_template() { | |
global $template; | |
echo '<div style="width: 50%; margin: 40px auto; font-size: 12px; color: #c09853; background-color: #fcf8e3; border: 1px solid #fbeed5;padding: 2em; border-radius: 4px;"><p><strong>Current Template</strong></p><em>'; | |
print_r(str_replace(get_template_directory(), '', $template) ); | |
echo '</em></div>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment