1

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.

1 Answer 1

1

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

2
  • 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
    Commented Feb 18, 2012 at 19:07
  • In that case, no. The toolbar is meant to be outside the regular styling/layout of your site and theme.
    – EAMann
    Commented Feb 19, 2012 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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