-
daveporter
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 -
Alvind
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.
-
daveporter
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
-
Alvind
Hi Dave,
Try this CSS:
.wp-block-navigation__container .current-menu-item { color: #F68520; }
-
daveporter
Perfect, thanks so much!
Dave -
Alvind
You’re welcome!
- You must be logged in to reply to this topic.