• Resolved Codefix

    (@mhds)


    Hello,
    I want to redirect the user to the page that user was visiting before registration, There is an option for login but not for registration. Is that possible? or is there any hook to use for this purpose?
    and I want to redirect user to a specific URL after user updates his/her profile I’ve Used several hooks but none of them works or maybe I used them in a wrong way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @mhds

    1. For the redirection after the Registration, you can change the redirection in the User Role settings. Please go to WP Admin > Ultimate Member > User Roles > Edit a role > see “Registration Options” > see “Action to be taken after registration”.

    2. You can use the following action hook to redirect users after updating the profile:

    add_action("um_user_after_updating_profile","um_072121_redirect_after_update");
    function um_072121_redirect_after_update( $user_id ){
         wp_redirect("yoursite.com/custom-page/"); exit;
    }
    

    Regards,

    Thread Starter Codefix

    (@mhds)

    Thanks for the replay @champsupertramp.
    I know that I can change the redirection in the user role setting but I want to redirect user to the page that he/she was visiting before registration like “refresh active page” option in login section is there any option for that?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @mhds

    To redirect them back to a previous page after the Registration, the Register Page URL should have the redirect_to parameter.

    Please try adding the parameter:
    yoursite.com/register/?redirect_to=/my-custom-page/

    Regards,

    • This reply was modified 3 years, 4 months ago by Champ Camba.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @mhds

    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,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Refresh active page after registration’ is closed to new replies.