Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Rumesh Udash

    (@rumesh38)

    Hi @chefnelone,

    Yes, you can add redirect_url in your login shortcode. Like [user_registration_my_account redirect_url = "/my-account"].
    https://docs.wpeverest.com/docs/user-registration/registration-form-and-login-form/how-to-show-login-form/

    Hope this helps!

    Regards!

    Hi Rumesh,

    Problem is that I will use the login form in a lot of pages. Question: is there any way to catch the page dynamically with a variable?

    Something like:

    [user_registration_my_account redirect_url = “$GET_CURREN_PAGE”]

    Plugin Support Rumesh Udash

    (@rumesh38)

    Hi @chefnelone,

    You can use the following code for your purpose. This piece of code will catch your referer page URL and after successfull user login it redirect your user back to the specific page and remove cached URL.

    Please add this code in the function.php file of your theme.

    add_action( 'user_registration_before_customer_login_form', 'ur_set_redirect_url' );
    function ur_set_redirect_url() {
        if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
        set_transient( 'originalLoginRefererURL', $_SERVER['HTTP_REFERER'], 60*60*24 );
    }
    
    }
    
    add_filter( 'user_registration_login_redirect', 'ur_redirect_back', 10, 2 );
    function ur_redirect_back( $redirect, $user ) {
        if ( true === ( $redirect_url = get_transient( 'originalLoginRefererURL' ) ) ) {
            delete_transient( 'originalLoginRefererURL' );
            return $redirect_url;
        }
        return $redirect_url;
    }

    Thanks!

    Hi,

    Thank you!

    Hi @rumesh38

    I tried the code [user_registration_my_account redirect_url = "/my-account"]
    on my registration page, but it doesn’t work.

    For some reason, I feel that users are not really paying too much attention to the message they get saying that they need to confirm their registration by going to their email and clicking the link at the bottom of the page once they click Submit.

    I want to create a page just dedicated to that message with additional info and maybe even an image.

    Is that possible?

    Thank you so much! 🙂

    • This reply was modified 2 months, 3 weeks ago by  Tiago "3ple".
    • This reply was modified 2 months, 3 weeks ago by  Tiago "3ple".
    • This reply was modified 2 months, 3 weeks ago by  Tiago "3ple".
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.