How to display menu bar only after log in?

Hi there,

I need to show a new menu BAR only when a user is logged in. (Not only the menu but a FULL NEW BAR)
How can this be achieved?

Thank you

Hey Iban,

Regretfully, Pro doesn’t currently have a user status visibility feature. There’s a workaround though as WordPress provides a body class for logged in users and that is logged-in. Try adding this code to the bar’s Element CSS to hide it for logged out users.

body:not(.logged-in) $el.x-bar {
	display: none;
}

To hide a bar when for logged in users, the code would look like this:

.logged-in $el.x-bar {
	display: none;
}

If you wish to hide stuff using a class, just replace $el.x-bar with your own class and add the code in Theme Options > CSS for global implementation.

Hope that helps.

Thank you Christian that worked!

You’re most welcome, Iban.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.