Hi all,
Anyone knows how to create a simple Login/Register button that would send the user to the login/signup page and then the button would be hidden from the screen once the user is logged in?
It is useful to implement this type of buttons on many locations on the website as these buttons are great call to action for users to create an account.
The only way I know to do this is by adding from the Editor menu>Members a connexion bar. But such a bar is not good to add anywhere on the website as it is not customizable like a button. And it also comes with a full member menu and notification bell when the user is logged in. So, this does not work with what I want to achieve.
Seems that custom code needed is something like: "hide the connexion button when user is logged in", plus other things...
As I am new to Wix and Wix Code, I still need to learn how to do this.
Any help would be greatly appreciated.
Thanks!
#loginbutton #signupbutton #registerbutton #login #signup #register #calltoaction #CTA
You can simply setup your own button that takes users to your own login/signup page, or you can just have custom login/signup lightboxes popup instead.
To show or hide any button then just use the if user logged in option and show and hide elements
https://support.wix.com/en/article/wix-code-tutorial-building-your-own-members-area
https://support.wix.com/en/article/wix-code-enabling-custom-site-registration
https://www.wix.com/code/reference/wix-users.html#login
https://www.wix.com/code/reference/wix-users.html#register
https://support.wix.com/en/article/wix-code-tutorial-creating-a-custom-registration-form-with-code
https://www.wix.com/code/reference/wix-users.User.html#getEmail
https://www.youtube.com/watch?v=QbH8_eudjbE
https://www.youtube.com/watch?v=yLCOqsVHhD0
https://www.youtube.com/watch?v=Orl8GJNzG5s