Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Redirect after-registration WordPress

  • SOLVED

Hello there,

We have this pop-up signup form [[LINK href="http://jobtribe.com/"]]here[[/LINK]].

We have 2 different types of user role: candidates and employers.

We need to redirect successfully registered users to a role-specific URL immediately after signup.

Thanks a lot!

Answers (3)

2015-02-23

Shoeb mirza answers:

Did you forget to look at the plugin settings?
Navigate to Mailchimp for WP > forms, scroll down to "Redirect to URL after successful sign-ups.


intilabs comments:

Hello Shoeb, I'm not talking about the newsletter signup but registration to the site.


Shoeb mirza comments:

I really don't see popup form you're mentioning.


intilabs comments:

I'm so sorry, I forgot the landing page was up.

You can go in now. you'll see the "signup" link on the top menu.

Sorry again


Shoeb mirza comments:

From the URL you've posted, this must be the answer

add_filter( 'jobify_registeration_redirect', 'custom_registration_redirect' );

function custom_registration_redirect() {

$role = $_POST['role'];
if ($role == 'seeker') {
return home_url('/seekers');
} else if ($role == 'employer') {
return home_url('/employers');
} else {
return home_url();
}

}


intilabs comments:

Thanks Shoeb! you answer worked perfectly!

thanks to you Jeremy as well

2015-02-23

Jeremy answers:

You can use the registration_redirect filter

apply_filters ( 'registration_redirect', string $registration_redirect )


intilabs comments:

Hello Jeremy,

I am doing this: (but isn't working)



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


Thanks


Jeremy comments:

Unfortunately I am unable to see anything beyond the landing page, so I can't really provide a specific answer. Are you using the standard Wordpress Registration Form or a plugin (Gravity Forms with User Registration Addon, etc.) ?


intilabs comments:

Oh my god. I'm so sorry guys, I forgot the landing page was up.

You can go in now. you'll see the "signup" link on the top menu.

Sorry again


Jeremy comments:

Never used Modal Registration Plugin. To get started you can try the following in functions.php

add_filter( 'registration_redirect', 'custom_registration_redirect' );

function custom_registration_redirect() {

$role = $_POST['role'];
if ($role == 'candidate') {
return home_url('/candidates');
} else if ($role == 'employer') {
return home_url('/employers');
} else {
return home_url();
}

}


intilabs comments:

Jeremy, this is exactly my [[LINK href="https://wordpress.org/support/topic/redirect-after-succesfull-registration?replies=5"]]problem[[/LINK]].


Jeremy comments:

Okay. In taking a quick look at the WP Job Manager Code you will find the following function in wp-job-manager-functions.php around line 320. This is the function you will need to work with to apply your filter adapted from above.

function wp_job_manager_create_account( $args, $deprecated = '' )

2015-02-23

Reigel Gallarde answers:

What are the plugins involved in your registration? the answer depends on how you are implementing your registration...