Leave a Reply

3 comments

  1. If you’re using the built in function to create the login box, one of the parameters is redirect. wp_login_form function reference

    To get your profile link, check when you’re logged in as admin. The link is the same, but the options presented are different. Default is yoursite.com/wp-admin/profile.php

  2. IF you wants to use plguin bp redirect to profile go here:

    add_filter( 'bp_login_redirect', 'bpdev_redirect_to_profile', 11, 3 );
    
    function bpdev_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
    
        if( empty( $redirect_to_calculated ) )
            $redirect_to_calculated = admin_url();
    
        //if the user is not site admin,redirect to his/her profile
    
        if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
            return bp_core_get_user_domain( $user->ID );
        else
            return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/
    
    }