Skip to content

Instantly share code, notes, and snippets.

@taricco
Last active July 30, 2022 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taricco/86971bbdd50211c0a850cafd0fbe3f7f to your computer and use it in GitHub Desktop.
Save taricco/86971bbdd50211c0a850cafd0fbe3f7f to your computer and use it in GitHub Desktop.
/* Shows entire path */
function wsv_which_template_is_loaded()
{
if (is_super_admin()) {
global $template;
print_r($template);
}
}
add_action('wp_footer', 'wsv_which_template_is_loaded');
/* Shows realtive path */
echo get_post_meta(get_queried_object_id(), '_wp_page_template', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment