Redirect to custom register page with wordpress

Views: 536 Last modified: August 02nd, 2011 Comments: 0

You created your custom register page ? And you want all the registrations done on that customized page ? Instead of the default wordpress page ? Then this might be your solution.
It checks for the default wordpress page and redirect the visitors to your custom page.

Just copy and paste this snippet into your functions.php or other suitable file and replace /registernow to your own URI. Save your file and done.

<?php
/**
 * RedirectWPRegister()
 * Redirect from Default wordpress register page to custom regsiter page.
 */
function RedirectWPRegister(){
    $request = basename($_SERVER['REQUEST_URI']);
    if ($request == 'wp-login.php?action=register'):
        wp_redirect(site_url('/registernow'));
        exit();
            endif;
}

add_filter('init', 'RedirectWPRegister');
?>
VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

    Mail this!

    To: From:Sum {2+4} =  
    Anything to add ?

        You must be logged in to post a comment.