Skip Navigation

[Resolved] Redirect user to previous page after login

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 3 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#2116345

I know I can use Toolset to create a login form and redirect the user to a certain page after login as described on https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-login-form.

However, is it also possible to redirect the user back to the page they were on before they went to the login page?

So say a user is on the contact page, and clicks on the "login" menu item. He will then be taken to the login page. After logging in, he should be redirected back to the contact page, since that's the page he was on before he went to the login page.

#2116621

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

Thank you for getting in touch.

Unfortunately you're not able to do this with our Toolset plugins and shortcodes. However given that our plugin triggers the wordpress default login functions then you should be able to follow the instructions in the link below to create a custom script to do this.
hidden link

Please let me know if this helps.
Thanks,
Shane