• Resolved riemers

    (@riemers)


    In your theme you can go to functions.php, edit that.

    Then place this:

    function possibly_redirect(){
      global $pagenow;
      if( empty($_POST) && 'wp-login.php' == $pagenow ) {
        if ( isset( $_POST['wp-submit'] ) ||   // in case of LOGIN
          ( isset($_GET['checkemail']) && $_GET['checkemail']=='confirm') ||   // in case of LOST PASSWORD
          ( isset($_GET['checkemail']) && $_GET['checkemail']=='registered') ) return;    // in case of REGISTER
        elseif ( isset($_GET['action']) && $_GET['action']=='logout') wp_redirect(home_url('/logout'));
        else wp_redirect(home_url('/login'));
        exit();
      }
    }
    add_action('init','possibly_redirect');

    Don’t know if you have other login options, but this redirects the normal login/logout via the url’s /login and /logout (default of this plugin) if different change it, but it works for me.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Easy support for login/logout’ is closed to new replies.