Created
June 27, 2022 15:21
-
-
Save kbcarte/31dda89005ef3340e4c5e94f3ebd17b3 to your computer and use it in GitHub Desktop.
WordPress show page template 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 | |
// Yoink: https://mekshq.com/which-wordpress-template-file-used/ | |
//For example, you can paste this into your theme functions.php file | |
function meks_which_template_is_loaded() { | |
if ( is_super_admin() ) { | |
global $template; | |
print_r( $template ); | |
} | |
} | |
add_action( 'wp_footer', 'meks_which_template_is_loaded' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment