Advertisement
afsarwebdev

Wordpress admin bar at footer of page when logged in

Aug 29th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. This code use in functions.php or style sheet in style.css/scss
  2. http://wpengineer.com/2190/move-wordpress-admin-bar-to-the-bottom/
  3.  
  4. function fb_move_admin_bar() {
  5. echo '
  6. <style type="text/css">
  7. body {
  8. margin-top: -28px;
  9. padding-bottom: 28px;
  10. }
  11. body.admin-bar #wphead {
  12. padding-top: 0;
  13. }
  14. body.admin-bar #footer {
  15. padding-bottom: 28px;
  16. }
  17. #wpadminbar {
  18. top: auto !important;
  19. bottom: 0;
  20. }
  21. #wpadminbar .quicklinks .menupop ul {
  22. bottom: 28px;
  23. }
  24. </style>';
  25. }
  26. // on backend area
  27. add_action( 'admin_head', 'fb_move_admin_bar' );
  28. // on frontend area
  29. add_action( 'wp_head', 'fb_move_admin_bar' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement