1 comment

  1. You are definitely on the right track; just add a filter (not action!) to your functions.php and pass in the redirect_to parameter (no need for wp_redirect). As soon as the user has submitted the registration form, there will be a redirect to the new page:

    add_filter( 'registration_redirect', 'redirection_link' );
    function redirection_link( $redirect_to ) {
        return $redirect_to . 'xtreme/page=1406';
    }
    

    Update: To perform a hard/permanent redirect to another page you can go with an wp_redirect like this:

    add_filter( 'registration_redirect', 'redirection_link' );
    function redirection_link( ) {
        wp_redirect( 'http://abcd.com/xtreme/page=1406', 301 );
        // wp_redirect( home_url( '/xtreme/page=1406' ), 301 );
        exit;
    }
    

    Update 2: You can also pass in additional parameters (e.g. redirect_to) if you modify the default register_url:

    add_filter( 'register_url', 'custom_register_url' );
    function custom_register_url( $register_url ) {
        $register_url = home_url( '/wp-login.php/?action=register&redirect_to=http://abcd.com/xtreme/page=1406' );
        return $register_url;
    }
    

    Update 3: You can update/reset the registration_redirect to your new register_url (from Update 2) like this:

    add_filter( 'registration_redirect', 'reset_redirection_link' );
    function reset_redirection_link() {
        return wp_registration_url();
    }
    

Comments are closed.