This topic has 7 replies, 2 voices, and was last updated 9 years by Radu.

  • Author
  • #125199
     srcnc
    Participant

    Hi, I’d like to make redirect to my account page after user’s login. Now it’s going to homepage after login. Could you please advise how to do it? I tried to select “redirect to current user profile or author page” on theme options, but it comes with another problem. After I selected this option, I can’t go to home page. Whenever I clicked logo or home menu, it goes to my profile(my account) page…;-((

    Please help me out. Thanks much in advance~

    #125229
     Radu
    Moderator
    Not marked as solution
    #125239
     srcnc
    Participant
    Not marked as solution
    #125379
     Radu
    Moderator
    Hi, Please leave all that settings regarding the redirection to default values and use plugin : https://wordpress.org/plugins/peters-login-redirect/ Install Peters Login Redirect plugin. Set your custom redirect to WP default, then in Peters plugin settings, set the login redirect to http://www.yoursite.com/members/[variable]username[/variable] OR you can use instead the plugin this function , that should be added into wp-content/themes/kleo-child/functions.php
        function sq7_rdu_redirect( $redirect_to, $request, $user ) {
        $redirect_to = bp_core_get_user_domain($user->ID) . 'profile/';
        return $redirect_to;
    }
    add_filter('login_redirect', 'sq7_rdu_redirect', 11, 3);
    
    
    Note : Child theme needs to be installed and activated Cheers R.
    #125409
     srcnc
    Participant
    Not marked as solution
    #125434
     Radu
    Moderator
    Hi, Please the function method copy this code : http://pastebin.com/raw/aJM9MS1G and paste it to child theme functions.php Note : Child theme needs to be installed and activated Let me know Cheers R.
    #125439
     srcnc
    Participant
    Not marked as solution
    #125500
     Radu
    Moderator
    Not marked as solution
Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?