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

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 '14 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.

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.