Redirect to previous page after login

This topic contains 3 replies, has 2 voices, and was last updated by Avatar Pie Register 3 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10003952
    Avatar
    Marcus Azevedo
    Participant

    I am sorry if the solution for that is already in some place, but I searched for that everywhere and all I found was outdated.

    Is there a way to make the user to be redirected to the page he was before login? How?

    Thanks

    #10003960
    Avatar
    Pie Register
    Participant

    Hello,

    You can do it with little programming. All you need to do is to pass the current page URL to redirect_to variable and append it on login page url.
    i.e: http://example.com/login-page/?redirect_to=http%3A%2F%2Fexample.com%2Fsome-page%2F

    Hope it helps

    Thanks

    #10003975
    Avatar
    Marcus Azevedo
    Participant

    I understand the concept, but where exactly do I pass the current page URL to the redirect_to variable? On pie-register.php? Or on wp-login.php?

    Thanks for the help!

    #10003979
    Avatar
    Pie Register
    Participant

    Both login pages will accept and process with redirect_to variable.

    So whatever you are using just append the URL with parameter in your page

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Pie-Register 2.0 Support’ is closed to new topics and replies.

Checkout
0
PURCHASE NOW