• these codes about wordpress frontend register form. first tab is function of direct login after success registration. Everything is ok for that. It’s working single. But second tab error redirect url is problem. The problem is if form true or false always return error page. How can I fixed that. Sorry I couldn’t tell well cause my bad english. I need these codes perfectly working for redirect wordpress register error and success register. Thanks for help.

    function possibly_redirect_register() {
    $thispage = $_SERVER[‘REQUEST_URI’];
    $register = site_url(‘/account-notice’);
    if(strpos($thispage, ‘action=register’) !== FALSE) {
    wp_redirect($register . ‘?secure=error-register’ );
    exit();
    }
    else {
    wp_set_current_user($user_id);
    wp_set_auth_cookie($user_id);
    wp_redirect( home_url(‘/account’) );
    }
    }
    add_action(‘init’,’possibly_redirect_register’);

The topic ‘WordPress Register Form Redirect’ is closed to new replies.