Answers for "Find template serving current page"

PHP
0

Find template serving current page

function show_template() {
    if( is_super_admin() ){
        global $template;
        print_r($template);
    } 
}
add_action('wp_footer', 'show_template');

//displays the current template only for super admins
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language