skip to Main Content

WordPress Code Snippets


How to Add Custom Profile Menu Item in BuddyPress

Create a custom menu tab in BuddyPress profiles for additional content.

// Add a custom menu item to BuddyPress profile navigation
function add_custom_menu_item() {
    bp_core_new_subnav_item(array(
        'name'            => 'My Custom Tab',
        'slug'            => 'custom-tab',
        'parent_url'      => bp_displayed_user_domain() . '/profile/',
        'parent_slug'     => 'profile',
        'screen_function' => 'custom_tab_content',
        'position'        => 50,
    ));
}
function custom_tab_content() {
    echo '<h2>Custom Content</h2>';
    echo '<p>This is a custom tab in the BuddyPress profile.</p>';
}
add_action('bp_setup_nav', 'add_custom_menu_item');


I’m a WordPress developer with 10+ years of experience in WooCommerce and custom plugins. I combine technical expertise with design flair to help you create standout, user-friendly websites. Let’s transform your digital presence!

Best WordPress Hosting
Back To Top