Adding custom subnav in buddypress profile area

Add this code in your wp-content/plugins/wplms-customizer/wplms-customizer.php file :

function bp_page_nav(){
    global $bp;
 
    $user_domain = bp_displayed_user_domain() ? bp_displayed_user_domain() : bp_loggedin_user_domain();
    $profile_link = trailingslashit( $user_domain . $bp->profile->slug );
    bp_core_new_subnav_item( array(
    'name' => 'Page',
    'slug' => 'page',
    'parent_url' => $profile_link,
    'parent_slug' => $bp->profile->slug,
    'screen_function' => 'page_screen',
    'position' => 20
 
    ) );
}
add_action('bp_setup_nav', 'bp_page_nav', 10 );
 
function page_screen(){
    global $bp;
    add_action( 'bp_template_content', 'bp_page_screen_content' );
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}
 
function bp_page_screen_content(){
    global $bp;
    echo 'Content';
 
}