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

Is there a way to call the toolbar or adminbar as you would a menu?

            'container' => false, 
            'menu_id' => 'nav', 
            'theme_location' => 'primary', 
            'fallback_cb' => 'bp_dtheme_main_nav' 

I want to add the toolbar to a div within the header.php file. Currently the toolbar is being called in the footer.php and styled by the css to a fixed position in the body.

Or perhaps is there a script I could run which would amend a div around the <div id="wp-admin-bar">?

I am running the latest install of WordPress, 3.3.1 with BuddyPress as a plugin. Using a child-theme I created. I've noticed a few of the normal WordPress functions do not work well with the BuddyPress plugin.

share|improve this question
up vote 0 down vote accepted

There's actually an entire API for adding/removing items in the Toolbar. You're specifically looking for the add_menu() method.

share|improve this answer
Sorry it took me so long to reply. I don't want to add anything to the menu, I just want to be able to place the admin bar inside a div so I can control where it is being placed on a page. – Kapitol Feb 18 '12 at 19:07
In that case, no. The toolbar is meant to be outside the regular styling/layout of your site and theme. – EAMann Feb 19 '12 at 0:57

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.