Skip to:

Register Redirection Woes

  • Chuckie


    I have something funny going on.

    I have this code running as a snippet:

    // Redirect Registration Page
    function my_registration_page_redirect()
        global $pagenow;
        // Standard Registration Redirect
        if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['action']) == 'register') ) {
            wp_redirect( home_url('/register/') );
        // Redirection after successful registration
        if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['checkemail']) == 'registered') ) {
            wp_redirect( home_url('/registration-complete/') );
    add_filter( 'init', 'my_registration_page_redirect' );

    Now, I start a browser and go to my website:

    About Theocratic Software

    I scroll to the bottom and I see my existing username and password in the login box (but not logged in).

    I hit the Register button and it goes to my registration form.

    I fill it in and tick the recaptcha and hit the register button.

    There is a momentary delay and it just moves to the stbndard wp-login.php page with the existing username and password prefilled. I get no emails to the new account i filled in the form.

    So, I hit back in my browser and my new account is filled in the form. I tick the recaptcha again and hit register again. This tie, after a delay, it takes me to my registration complete page and I do indeed get the email re: password and account activation.

    I thought I had understood the registry redirection correctly so why do I get the initial issue? It has happened twice for me now.

  • You must be logged in to reply to this topic.
Skip to toolbar