The login_redirect filter should works (add this code into your theme functions.php):
function my_login_redirect( $redirect_to, $request, $user ) {
$redirect_to = home_url($user->user_nicename);
return $redirect_to;
}
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );
For “PROFILE” in the menu (add this code into your template file where you want to display it):
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
echo '<a href="' . esc_url( home_url( $current_user->user_nicename ) ) . '">PROFILE</a>';
}
UPDATE: If you manage menu from backend, I don’t know if any better solution, but this will works:
Add a custom menu item with name “PROFILE”, and add this code in your theme functions.php:
function filter_nav_menu_items( $menu ) {
if ( $menu->title == 'PROFILE' ) {
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
$menu->url = home_url( $current_user->user_nicename );
}
else {
$menu->_invalid = true;
}
}
return $menu;
}
add_filter( 'wp_setup_nav_menu_item', 'filter_nav_menu_items', 999 );