Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

<?php 
    wp_nav_menu( 
        array( 
            '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

1 Answer 1

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

 
discard

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.