How to Add a New Menu Item to the BuddyPress Component Menu

Today I needed to add a new menu item to the BuddyPress components menu (the menu under the profile with “Settings”, “Groups”, “Forums”, “Profile”, etc.).

In my example below, the menu item will be called, “My Conversations”, and it will link to the “Groups” template.

 __( 'My Conversations', 'buddypress' ), 
            'slug' => 'my-all-conversations', 
            'position' => 75,
            'screen_function' => 'my_all_conversations_link',
	    'show_for_displayed_user' => true,
	    'default_subnav_slug' => 'my-all-conversations',
	    'item_css_id' => 'my-all-conversations'
      ) );
}
add_action( 'bp_setup_nav', 'my_setup_nav', 1000 );
function my_all_conversations_title() {
	echo 'My Conversations';
}
function my_all_conversations_content() {
	?>
	

That’s it! Enjoy!

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to twitter.com/tobycryns and twitter.com/themightymo

Follow Toby's contributions on Github and WP.org.