/ Published in: PHP

This will show you what template you are currently viewing (index.php, page.php)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_action( 'wp_head', 'show_me_the_template' ); function show_me_the_template() { global $template, $current_user, $wp_admin_bar; get_currentuserinfo(); /* If you have more than one user deny. Be sure to use your user ID! */ if ( !is_user_logged_in() && $current_user->ID != '1' ) return; if ( is_admin_bar_showing() ) 'parent' => false, 'id' => 'template', 'title' => $template, 'href' => '#' )); else }
Comments
