Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Advice on placing a menu

  • Hi everyone,
    I am working on a refresh of a site – I started off by cloning it, then imported the Construction starter site.
    All good.
    There is a members only login, which is working fine, and all the pages that members can access have this menu on the right hand column (see link below – login required, but I have turned that off, as the link is to a new domain to develop this site!)
    So really just some advise on the best way to add this to only those pages in this menu ?
    TIA, Dave

  • Hi there,

    To achieve that, I think the best way is by creating the menu as a sidebar using the Element module, where you can conditionally set the visibility to apply only for logged-in members.

    Start by creating a new Block Element. Under Element settings on the right-hand side, choose Right Sidebar.

    For the Location setting, you can set it to Page and choose the pages that only members can access. Then, under Users setting, set it to Logged In or use a custom role if you have one for these members.

  • Thanks Alvind,
    That works great, I can move on…
    But one question?
    I am styling the links in that menu:

    .wp-block-navigation-item__label:hover { color: #F68520; }
    

    Which works, but I can’t work out how to style the link for the page I am on (in that same menu) with the same color ?
    I updated the link to one that is relevant!

    TIA, Dave

  • Hi Dave,

    Try this CSS:

    .wp-block-navigation__container .current-menu-item {
      color: #F68520;
    }
  • Perfect, thanks so much!
    Dave

  • You’re welcome!

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