Re: Make wp-admin-bar relative position and inline within header instead of footer / absolute position?
The reason that the admin bar is loaded in the footer might be partially for SEO reasons, as @hnla hypothesizes, but I’m guessing it’s more for plain old load time while it’s a minor annoyance if the admin bar takes an extra second or two to show up, it’s a real problem if the content of the page is delayed. Putting this kind of stuff in a footer is, I think, pretty standard practice. @mrsalty If you want to move the code higher up in the document for some reason, put the following into your theme’s functions.php file:
remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
add_action( 'bp_head', 'bp_core_admin_bar' );
If all you want to do is to have the admin bar stay at the top of the page instead of sticking to the top of the browser window as you scroll, just set its positioning to absolute rather than fixed:
#wp-admin-bar { position: absolute !important; }