Sauter la navigation

[Résolu] Redirect user to previous page after login

This support ticket is created Il y a 3 années et 9 mois. 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)

Marqué : 

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Shane Il y a 3 années et 9 mois.

Assisté par: Shane.

Auteur
Publications
#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

Les langues: Anglais (English )

Fuseau horaire: 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.
lien caché

Please let me know if this helps.
Thanks,
Shane