Move the WordPress Admin Bar to the Bottom

More than once the WordPress admin bar has bothered me because it hid menus that were set to position:fixed in CSS. A few lines in functions.php and the admin bar moves to the bottom of the page:

<?php
function fb_move_admin_bar() { ?>
	<style type="text/css">
		body {
			margin-top: -28px;
			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>
<?php }
add_action( 'admin_head', 'fb_move_admin_bar' );
add_action( 'wp_head', 'fb_move_admin_bar' );

For safe WordPress customizations, see What Are Child Themes and How to Use Them.

Discussion
[  3 Comments  ]
  • Juan Manuel
    Juan Manuel 25 May 2026, 5:43

    This solution is pretty good! I found, however, that the sub-menu “+ New” is not visible when the admin bar is at the bottom. I will see if I can make it appear on top…

  • Juan Manuel
    Juan Manuel 25 May 2026, 5:47

    Ah, I found it:

            div#wpadminbar {
               top: auto;
               bottom: 0;
               position: fixed;
           }
            .ab-sub-wrapper {
                bottom: 32px;
            }
            html[lang] {
                margin-top: 0 !important;
                margin-bottom: 32px !important;
            }
            @media screen and (max-width: 782px){
                .ab-sub-wrapper {
                    bottom: 46px;
                }
                html[lang] {
                    margin-bottom: 46px !important;
                }
            }

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!