Created
March 24, 2013 15:29
-
-
Save alexpos/5232338 to your computer and use it in GitHub Desktop.
Add the below snippet into your functions.php file and it will return the current theme template WordPress is using in the console.
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
function templatedebug() { | |
global $template; $curtemplate=basename($template); | |
?> | |
<script type="text/javascript"> | |
console.log(<?php echo "\"current template: ".$curtemplate."\""; ?>); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'templatedebug' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment