how to redirect user to specific page after login

Home Forums Legacy Support Support queries How-to & Troubleshooting how to redirect user to specific page after login

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #380594
    amishbhavsar_136
    Participant
    Hi, I want to redirect my users to https://online.accellearning.com/my-account/ after logging in. I see the setting under LMS > Settings > User Login & Registration Settings https://i.imgur.com/sbuSoTs.png But there is no option to redirect the user to a specific page.
    #380706
    Veronica
    Moderator
    hi you need to check this tip: https://wplms.io/support/knowledge-base/login-redirect-to-a-custom-page/
    #380742
    amishbhavsar_136
    Participant
    Hi Veronica, What you shared is from a 2015 note... way before WPLSM 4.x was conceived. Will the same solution work with WPLMS 4.x with the VibeBP plugin.
    #380762
    Veronica
    Moderator
    yes it will work in v4 as well
    #380859
    amishbhavsar_136
    Participant
    Hi, I tried these instructions, and it still does not work.
    #380941
    Veronica
    Moderator
    hi refer this tip: https://wplms.io/support/knowledge-base/adding-custom-links-in-studentinstructor-login-redirect/ so you can add custom page in LMS>>Setting
    #380975
    amishbhavsar_136
    Participant
    Hi Veronica, Thanks, this link worked - but only partially. It worked for the Student but it is not working for the Instructor, because the Instructor login redirect is calling the same function: wplms_redirect_student_to_custom. So it is throwing an error.
    add_filter('wplms_instructor_login_redirect_filters','wplms_redirect_student_to_custom');
     
    function wplms_redirect_student_to_custom($labels){
    $labels['custom'] = 'Custom Link';
    return $labels;
    }
     
    add_filter('wplms_redirect_location','wplms_custom_filter_location_instructor');
     
    function wplms_custom_filter_location_instructor($links){
    $links['custom'] = 'http://customlink';
    return $links;
    }
    #381028
    Veronica
    Moderator
    use this:
    add_filter('wplms_instructor_login_redirect_filters','wplms_redirect_instructor_to_custom');
     
    function wplms_redirect_instructor_to_custom($labels){
    $labels['custom'] = 'Custom Link';
    return $labels;
    }
     
    add_filter('wplms_redirect_location','wplms_custom_filter_location_instructor');
     
    function wplms_custom_filter_location_instructor($links){
    $links['custom'] = 'http://customlink';
    return $links;
    }
    #381050
    amishbhavsar_136
    Participant
    Thanks. You can close this now.
    #381104
    Veronica
    Moderator
    thanks for your confirmation
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘how to redirect user to specific page after login’ is closed to new replies.