Hi @smartlemon
You can try adding the following code snippets to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code:
add_action("um_registration_after_auto_login","um_050621_redirect_to", 1, 1 );
function um_050621_redirect_to( $user_id ){
wp_redirect( get_the_permalink() ); exit;
}
The above code will redirect the user after registration to the active page.
Regards,
Hi, thx.
But i would need this only for a specific usergroup, is this also possible?
regards, christian
Hi @smartlemon
You can try this for specific user role:
add_action("um_registration_after_auto_login","um_050621_redirect_to", 1, 1 );
function um_050621_redirect_to( $user_id ){
um_fetch_user( $user_id );
if( "subscriber" == um_user("role") ){
wp_redirect( get_the_permalink() ); exit;
}
}
Just change the subscriber role to your preferred role slug.
Regards,
Hi @smartlemon
…This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,