WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I already have a custom login from built with the following code:

add_action('login_redirect', 'jwh_redirect_login', 10, 3);
function jwh_redirect_login($redirect_to, $url, $user) {

$url = current(explode('?', $url));

    wp_redirect( $url . '?jwh_error=nopass');
else if($user->errors['empty_username']){
    wp_redirect( $url . '?jwh_error=nouser');
else if($user->errors['incorrect_password']){
    wp_redirect( $url . '?jwh_error=invalidpass');
else if($user->errors['invalid_username']){
    wp_redirect( $url . '?jwh_error=invaliduser');
else if(!empty($user->data)){
    wp_redirect( $url);
    wp_redirect($url . '?jwh_error="nothing');


Works great. User stays in place no matter the error or successful login. Now for the registration part. Problem there is if there is a registration error of any kind, the use is redirected to Is there a similiar hook I can use to site-url/wp-login.php?action=register

Is there a hook similar to login_redirect but for registration?

share|improve this question
Using the answer I posted in your other question: wordpress.stackexchange.com/questions/98125/… You can redirect them wherever you want after registration as you're controlling the entire process rather than hooking onto a specific part of core. – Andrew Bartel May 2 '13 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.