This code will change the WordPress profile to bbpress profile
add_action('wp_before_admin_bar_render', 'rew_admin_bar_remove_wp_profile', 0);
function rew_admin_bar_remove_wp_profile() {
global $wp_admin_bar;
/* **edit-profile is the ID** */
$wp_admin_bar->remove_menu('edit-profile');
}
add_action('admin_bar_menu', 'rew_add_bbp_profile', 999);
function rew_add_bbp_profile($wp_admin_bar) {
$current_user = wp_get_current_user();
$user=$current_user->user_nicename ;
$user_slug = get_option( '_bbp_user_slug' ) ;
if (get_option( '_bbp_include_root' ) == true ) {
$forum_slug = get_option( '_bbp_root_slug' ) ;
$slug = $forum_slug.'/'.$user_slug.'/' ;
}
else {
$slug=$user_slug . '/' ;
}
$profilelink = '/' .$slug. $user . '/edit' ;
$wp_admin_bar->add_node( array(
'parent' => 'user-actions',
'id' => 'bbp-edit-profile',
'title' => 'Edit Profile',
'href' => $profilelink,
) );
}
Put this in your child theme’s function file – or use