Redirect to previous page after login

Home Forums Pie-Register 2.0 Support Redirect to previous page after login

This topic contains 3 replies, has 2 voices, and was last updated by  Hasnain Abbas 2 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3952

    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

    #3960

    Hasnain Abbas
    Keymaster

    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

    #3975

    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!

    #3979

    Hasnain Abbas
    Keymaster

    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)

You must be logged in to reply to this topic.