How to Move WordPress Admin bar to the Bottom

Not everybody likes the WordPress Admin Bar, which exists since WordPress 3.1, at the top of the browser. The following code will help you to display the admin bar at the bottom. Put this code in the function.php of your theme.





function fb_move_admin_bar() {
echo ' <style type="text/css">
  • 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' );

You can also use Stick Admin Bar to Bottom plugin for this purpose. Simply download it from here.

No comments:

Post a Comment