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.

Perhaps I have missed something fundamental, but I am attempting to include the various dynamic menu items included with BuddyPress and other add-ons to my primary drop-down menu.

For example, the Twenty Eleven WP theme has a tall header with a drop-down menu beneath the header. This menu can be manipulated via the Appearance->Menus option in wp-admin. BuddyPress adds its own menu items to the admin bar at the top of the page but does not include these links in the drop-down menu below the header. I would like to remove the admin bar completely and relocate all dynamic links to the drop-down menu.

I have already created a custom menu in the functions.php file:

function register_my_menus() {
  'header-menu' => __( 'Nav Menu' )
add_action( 'init', 'register_my_menus' );

And this menu is loaded in the header.php with:

<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>

I am able to add individual links to this menu using the wp_nav_menu_items function, but cannot seem to be able to replicate the dynamic menu structure created by the bp_nav functionality based on user.

Does anyone have ideas on how I could relocate this functionality? Or perhaps am I looking at the menu structure incorrectly?

share|improve this question

1 Answer 1

Though I don't have specific code to suggest, it seems like it would be possible to create something along the lines you mentioned by using a custom Nav Walker and generating buddypress-specific links with the $bp global (which you can learn more about here → http://codex.buddypress.org/developer/the-bp-global/).

You could alter $output in the custom Nav Walker based on checks against $bp, if it even exists.

share|improve this answer

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.