Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Each time I register I end up in the wp-login page (back-end):

enter image description here

Is there any way of redirecting the users who register to a page template (front-end)?

share|improve this question
    
check the available plugins for code samples –  kaiser Jun 10 '11 at 14:45
    
@kaiser what kind of plugins? –  janoChen Jun 10 '11 at 15:08
    
Redirect Plugins - Your clients will like it. –  kaiser Jun 10 '11 at 16:09
add comment

2 Answers

up vote 5 down vote accepted

You can use the filter registration_redirect to pass back your own URL, for example;

function __my_registration_redirect()
{
    return home_url( '/my-page' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

Drop it in your functions.php or a plugin :)

share|improve this answer
    
Thanks for the answer but I'm still being redirected to the wp-login back-end :( (I'm working on localhost LAMP, but I don't think that's the reason). –  janoChen Jun 10 '11 at 16:09
    
Are you sure the theme with the code is active? And which version of WP are you running? It worked fine for me (tested just now, 3.1.3). –  TheDeadMedic Jun 10 '11 at 16:21
1  
OK it worked after I deactivated bbPress I guess there is a conflict with the plugin. Thanks! –  janoChen Jun 10 '11 at 16:26
    
@TheDeadMedic I have a similar question but i'm registering from a page with a custom template that includes a registration form. The redirect isn't working it's taking me back to the main registration page with message to check my email for the password. Can you take a look at my question please. wordpress.stackexchange.com/questions/130560/… –  Anagio Jan 20 at 22:11
add comment

This is what i use

<form action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
<input type="text" name="user_login" value="Username" id="user_login" class="input" />
<input type="text" name="user_email" value="E-Mail" id="user_email" class="input"  />
<?php do_action('register_form'); ?>
<input type="submit" value="Register" id="register" />
<input type="hidden" name="redirect_to" value="/success"/>
<p class="statement">A password will be e-mailed to you.</p>
</form>
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.