/ Published in: PHP
Add this to the functions.php file. Make sure the Admin Bar is set to show when viewing site. You will see in the Admin Bar the current page template that is being used.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php add_action( 'wp_head', 'admin_print_template_used' ); function admin_print_template_used() { global $template, $current_user, $wp_admin_bar; get_currentuserinfo(); if ( !is_user_logged_in() && $current_user->ID != '1' ) return; if ( is_admin_bar_showing() ) 'parent' => false, 'id' => 'template', 'title' => $template, 'href' => '#' )); else } // START THE SCRIPT TO PUSH ADMIN BAR TO BOTTOM function fb_move_admin_bar() { echo ' <style type="text/css"> body { padding-bottom: 28px; } body.admin-bar #wphead { padding-top: 0; } body.admin-bar #footer { padding-bottom: 28px; } #wpadminbar { top: auto !important; bottom: 0; } #wpadminbar .quicklinks .menupop ul { bottom: 28px; } </style>'; } // on backend area add_action( 'admin_head', 'fb_move_admin_bar' ); // on frontend area add_action( 'wp_head', 'fb_move_admin_bar' ); ?>