Hello, everyone.
And immediately thank you to those who would like to respond.
Problem probably very simple for most of you, but not for me who only knows the basics of html.
What I need is that when a member of the private area logs in, he/she is redirected to the private “memebers area” page.
From Wix they told me that I have to use code because otherwise after the login the member remains on the page where they logged in from.
I have already searched the forum and tried but no…I can’t
Thanks again for giving me practical examples.
Greetings to all.
Hi there, follow these steps below and you are good to go:
-
Turn on Dev Mode.
-
From the Page Code panel on the left, select masterPage.js.
-
Simply replace the existing code with the one provided below:
import {authentication} from 'wix-members-frontend';
import wixLocationFrontend from 'wix-location-frontend';
const redirecturl = "https://google.com"
$w.onReady(function () {
authentication.onLogin(async (member) => {
wixLocationFrontend.to(redirecturl)
});
});
- Just replace the Google url with your own members area url and that’s it! (:
1 Like