Reply 197285 to: Login/Logout script

Avatar: Olga Barlow
Olga Barlow
Support staff
July 25, 2018 at 14:38

Hello,

The simple way to implement something similar to what you want is:

Create custom menu (Appearance > Menus) http://prntscr.com/kausqj with 3 links, last one should be created using the WC endpoints. Add the custom classes for the first one – hide-for-loggedin and for the next 2 items – hide-for-loggedout . Then add the following custom code in child theme style.css or in Custom CSS field of the parent theme.

.logged-in .widget_nav_menu .hide-for-loggedin {
    display: none;
}
.widget_nav_menu .hide-for-loggedout {
    display: none;
}
.logged-in .widget_nav_menu .hide-for-loggedout {
    display: block;
}

Go to Appearance > Menus add the Navigation Menu widget into sidebar where you want to show the links.

If this way is not suitable for you then you can try to create the special widget in case you have PHP skills or order customization here.

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.