WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to load the admin toolbar on the front end immediately after the head tag in my header.

I'm trying to achieve something like this as opposed to how it usually gets loaded at the end of the page.

<div id="wpadminbar" class="show-wp-toolbar" role="navigation">...</div>
<li><a href="index.php">Home</a></li>
<li><a href="/about/">About</a></li>
<li><a href="/blog/">Blog</a></li>

I want the menu bar to flow naturally with the rest of the page instead of being fixed so when I scroll up it hides with everything else.

I've found the admin bar gets loaded in "wordpress/wp-settings.php" on line 146:

   require( ABSPATH . WPINC . '/admin-bar.php' );

And admin bar itself is at:


However, I'm new at PHP and have had trouble figuring out how the order of page elements is determined.

share|improve this question

This is just a CSS edit. You don't need to alter how or where the admin menu loads. Add ...

#wpadminbar {
  position: absolute;

to your theme's stylesheet.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.