Create new BuddyPress profile tab

To add a new BuddyPress Profile Tab, you will need to use bp_core_new_nav_item() function.

Here is the sample code which can guide you adding a new tab. You can add this code to your theme’s functions.php file.

function profile_tab_yourtabname() {
      global $bp;
 
      bp_core_new_nav_item( array( 
            'name' => 'yourtab', 
            'slug' => 'yourtab', 
            'screen_function' => 'yourtab_screen', 
            'position' => 40,
            'parent_url'      => bp_loggedin_user_domain() . '/yourtab/',
            'parent_slug'     => $bp->profile->slug,
            'default_subnav_slug' => 'yourtab'
      ) );
}
add_action( 'bp_setup_nav', 'profile_tab_yourtabname' );
 
 
function yourtab_screen() {
    
    // Add title and content here - last is to call the members plugin.php template.
    add_action( 'bp_template_title', 'yourtab_title' );
    add_action( 'bp_template_content', 'yourtab_content' );
    bp_core_load_template( 'buddypress/members/single/plugins' );
}
function yourtab_title() {
    echo 'Title';
}

function yourtab_content() { 
    echo 'Content';
}