[Resolved] How can I hide the secondary menu to those not logged in?

Home Forums Support [Resolved] How can I hide the secondary menu to those not logged in?

Home Forums Support How can I hide the secondary menu to those not logged in?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #188366
    Pete

    How can I hide the secondary menu only to those not logged in?

    #188374
    Tom
    Lead Developer
    Lead Developer

    Give this a shot:

    body .secondary-navigation {
        display: none;
    }
    
    body.logged-in .secondary-navigation {
        display: block;
    }
    • This reply was modified 7 years, 11 months ago by Tom.
    #188376
    Pete

    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;}
    #188377
    Tom
    Lead Developer
    Lead Developer

    That’s not the same thing as the code I provided πŸ˜‰

    #188378
    Pete

    the ‘nope’ referred to your code, mine only worked a bit πŸ™‚

    #188379
    Tom
    Lead Developer
    Lead Developer

    Can you link me to the site where mine isn’t working?

    #188380
    Pete
    #188381
    Tom
    Lead Developer
    Lead Developer

    Can you replace your code with the code I provided?

    #188382
    Pete

    I did, nothing happened

    #188383
    Pete

    ok it’s running your css now

    #188385
    Tom
    Lead Developer
    Lead Developer

    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

    #188386
    Pete

    Great, thanks Tom πŸ˜‰

    #188388
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.