Advertisement
arnabkumar

adminbar_to_bottom

Sep 9th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. function custom_move_admin_bar() {
  2.     echo '
  3.    <style type="text/css">
  4.    body {
  5.    margin-top: -28px;
  6.    padding-bottom: 28px;
  7.    }
  8.    body.admin-bar #wphead {
  9.       padding-top: 0;
  10.    }
  11.    body.admin-bar #footer {
  12.       padding-bottom: 28px;
  13.    }
  14.    #wpadminbar {
  15.        top: auto !important;
  16.        bottom: 0;
  17.    }
  18.    #wpadminbar .quicklinks .menupop ul {
  19.        bottom: 28px;
  20.    }
  21.    </style>';
  22. }
  23. // // for show adminbar on backend area just uncomment it
  24. // if ( is_admin_bar_showing() )
  25. // {add_action( 'admin_head', 'custom_move_admin_bar' );}
  26. // on frontend area
  27. if ( is_admin_bar_showing() )
  28. {add_action( 'wp_head', 'custom_move_admin_bar' );}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement