Last active
April 7, 2017 10:31
-
-
Save brendonexus/655757af266a25c223bc76ff7ba1aabf to your computer and use it in GitHub Desktop.
Wordpress current template hook
This file contains 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
add_action('get_footer', 'show_template'); | |
function show_template() | |
{ | |
global $template; | |
if ($_SERVER['REMOTE_ADDR'] == 'ip_address') echo basename($template); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment