Login widget redirects to wp-login.php

The login widget is redirecting to wp-login.php instead of logging in the users from the front side. Is there a way to fix this?

I was not having this issue with Version 1.0.1.1

  • Ken Kimbrell

    Hello Ginny-

    I understand that you are having problems with how your users are redirected after logging in? Happy to help!

    Membership 2 does offer a redirect add-on. In order to activate this add-on, you would want to go into your wordpress dashboard and find Membership 2 > Add-ons. Next, look for "Redirect Control" and activate that add-on. See image below:

    Once the add-on is activated, you can go to Membership 2 > Settings, and now you will see an additional setting option for "Redirect", here you can put in the url for redirecting your users to wherever you like, after they are logged in. See image below:

    Let me know how this works for you!

    Take Care,

    Ken - WPMU DEV Support

  • Ginny

    Thank you for the quick response.

    I had it set up that way, but it would keep redirecting to the wp-login.php page no matter what.
    I went through and tested by deactivating then reactivating each of the other plugins one by one to see if something was conflicting.
    I thought it could be the captcha plugin I am using, but it wasn't. When I disabled Jetpack the front end login now works again. Not sure why, but I am going to investigate more :slight_smile:

  • Ken Kimbrell

    Hello Ginny-

    If there is a plugin conflict with Jetpack, and you really just need them to stay on the homepage after being logged-in. You could try this code:

    add_action('init','possibly_redirect');
    function possibly_redirect(){
     global $pagenow;
     if( 'wp-login.php' == $pagenow ) {
      wp_redirect('http://heartofohiosantas.org/');
      exit();
     }
    }

    Just add it to your child theme's function.php. See if that allows you to continue using the jetpack plugin and overrides any other redirection to the wp-login.php.

    Let me know how this works for you!

    Take Care,

    Ken - WPMU DEV Support