How do I get a new page to show up after a person logs in to my website?
Use your own button and wixUsers.prompLogin() code, then when a user logs in use wixLocation.to() :
wixUsers.promptLogin()
.then( (user) => {
wixLocation.to('/pageName');
})
Just to make the flow complete, on the page with your login button I would check if the user is already logged in:
$w.onReady(function(){
if (wixUsers.currentUser.loggedIn){
wixLocation.to('/pageName');
}
});
Liran.
Okā¦I will try it. Thank you!
Iām getting an error message saying wixUsers is unidentified. I get the same message for wixLocation saying itās unidentified as well. Do I have to change these to something else?
I want my members to be directed to another page on my website once they log in. I want them to go to another page after logging in on my landing page.
In your page of login, click en the button āloginā, edit your button for:ā¦> Link to> page> your page that you want.
Before, edit the permission of the page (member login o password)
⦠So the user willl show like this⦠LOGIN(button) > page for password (automatic from wix) > user input the password > final page
I see that when I click the Login/Sign up button on my landing page and sign in, Iām re-directed to that same landing page after signing in, but I want my members to be directed to my Home pageā¦itās a welcome page. How can they go directly to my welcome page after logging in to my website?
Does that require using code?
Dont need code.
One tip: You have a main page, for example āwelcome, click login pleaseā and on this page there is the login button that you will add manually, common button. You change the name of the button, write āloginā and to do link button to the second page that is the āwelcomeā page or any page you want.
The first page: You give permission for anyone to access.
The second page: You put a password restriction. (Password o login member)
What will happen: When the user accesses the first page and clicks the login button, it will be directed to a unique wix page for login, this page isnt created by you (by wix). After the user enters the password it will be directed to the second page that is the welcome page created by you.
Okā¦I understand now. I will that. Thank you!
Okā¦sorry for my bad English