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.

I want to customize the buddypress admin bar, so I created this file and put it in the plugins folder: bp-custom.php

Here is a copy of the code: http://pastebin.com/PcQRMXyJ

How can I make the first link the main link and the others dropdowns?

share|improve this question

closed as off-topic by kaiser Aug 4 at 16:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

First, you may want to consider using the WP toolbar (which features full BP integration), because the BP BuddyBar will not continue to be supported in future versions of BP. (It will probably still work, but it won't be actively upgraded.) Flip the Toolbar on by putting define( 'BP_USE_WP_ADMIN_BAR', true ); into your wp-config.php file. For more on customizing the Toolbar, a nice starting place is here: http://wp.smashingmagazine.com/2012/03/01/inside-the-wordpress-toolbar/

Second, if you are going to stick with the BuddyBar for now, you should just be able to create the dropdowns by putting nested <ul> elements into your main button <li>s:

echo '<li><a href="/forums/">Agent Forums</a>';
echo   '<ul>';
echo     '<li><a href="#">Item One</a></li>';
echo     '<li><a href="#">Item Two</a></li>';
echo   '</ul>';
echo '</li>';
share|improve this answer

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