Skip to content

Instantly share code, notes, and snippets.

@brendonexus
Last active April 7, 2017 10:31
Show Gist options
  • Save brendonexus/655757af266a25c223bc76ff7ba1aabf to your computer and use it in GitHub Desktop.
Save brendonexus/655757af266a25c223bc76ff7ba1aabf to your computer and use it in GitHub Desktop.
Wordpress current template hook
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