Support » Plugin: Elementor Website Builder » Login should redirect to page they were trying to view

  • Resolved amateurhr

    (@amateurhr)


    I run a membership site and if a user tries to view a page that requires membership, we redirect them to login using a Elementor Login form. Once they login the form has the ability to either redirect to a single URL or not redirect at all.
    1. By redirecting to single URL, the user has lost the page they were trying to view.
    2. By not redirecting they simply see the same login form with a “you are logged in”, which is totally useless.

    How do I redirect the user to the page they were trying to view? Like any modern website.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The way I understand it to work, leaving the redirect options blank is supposed to use the current page of the Elementor login form so in theory, you’d have to provide the login form on every page like a hidden popup modal dialog.

    However, I have found that this is not always the case and depends on what other plugins are hooking the wp login functions.

    In my case, the redirect url is always /wp-login.php when left blank rather than the real referrer url of the page in which the login was submitted.

    An original git issue was opened here, but closed out, maybe it will get reopened – https://github.com/elementor/elementor/issues/5266

    Best of luck to you!

    I definitely cannot add a login form to every page because I have about 100 pages and growing so I’ll have to wait until Elementor adds the functionality. I added my voice to the closed out git ticket but not holding my breath since it’s closed out. How do we reopen and who closed it out in the first place??

    pingram

    (@pingram3541)

    The way I went about it was using a pop-up and then assigning it to be site wide.

    I gave the pop-up a button class that would trigger it and then in my footer menu, I provided a custom link /#login with a class matching that of the pop-up trigger.

    I also had to add some custom code to switch the login button to “my account” when logged in and some JavaScript to keep the login form from submitting if either field was left blank.

    Everything works great except the part of the login form retaining the current url as the login redirect path.

    Thanks @pingram3541 !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Login should redirect to page they were trying to view’ is closed to new replies.