Archived topic
How can I hide the secondary menu to those not logged in?
12 replies · Started by Pete on April 21, 2016
How can I hide the secondary menu only to those not logged in?
Give this a shot:
body .secondary-navigation {
display: none;
}
body.logged-in .secondary-navigation {
display: block;
}
Nope and I tried this that worked but not when responsive (also dropped down the menu)
#menu-top.secondary-menu.sf-menu {display:none;}
.logged-in #menu-top.secondary-menu.sf-menu {display:block;}
That's not the same thing as the code I provided ;)
the 'nope' referred to your code, mine only worked a bit :)
Can you link me to the site where mine isn't working?
Can you replace your code with the code I provided?
I did, nothing happened
ok it's running your css now
I just adjusted the CSS above to be a little more specific - should work now: https://generatepress.com/forums/topic/how-can-i-hide-the-secondary-menu-to-those-not-logged-in/#post-188374
Great, thanks Tom ;)
You're welcome :)
