Archived topic
Always expand secondary menus.
14 replies · Started by Futte on July 8, 2020
I use a secondary menu on several pages, and have put theese menus in the left sidebar.
I would like the secomdary menu to be opened (expanded) all the time. Is that possible.
As it is now, I can not get into the parent pages. The only thing that happens when I click on the parentpage is, that it opens the summenu.
You can see an example on my page if you go to Foreninger>Frøslev & Omegn
I hope you can help me with this issue.
Kindly Futte
Hi there,
Can you give David's CSS here a shot?
https://generatepress.com/forums/topic/secondary-navigation-submenu/#post-581584
Adding CSS: https://docs.generatepress.com/article/adding-css/
Hi Leo
I have put in Davids code, but its not really right jet. (I have made som temporary color adjustments just to be able to see what happens)
If you go to Foreninger>Frøslev & Omegn You can see, that I still have to click on the parent item to get the submenenu. And it still doesn't get the parentpage, when I click at that. It just opens the submenu.
In the red box in the left sidebar, I have shown you, how I would like it to look and work. I hope that makes sense!
Hi there,
can you change the Customizer > Layout > Primary Navigation --> Navigation Dropdown to hover. Then let me know and ill look at the right CSS.
Great to have you back David!
Its done!
Remove the current CSS. And try this:
.secondary-navigation ul li ul {
display: block;
float: none;
position: static !important;
left: unset;
opacity: 1;
width: 200px;
pointer-events: auto;
height: auto;
overflow: initial;
margin-left: 2em;
box-shadow: none;
}
.secondary-navigation .main-nav .menu-item .dropdown-menu-toggle {
display: none;
}
THANKS!!!!
You're welcome
I need a little help with the look of my conditional menus. I am reopening this topic for the problem.
I wonder, if I can make some adjustments to my conditional menus, so they would look something like this:
I use the menus on
Fællesskaber>Frøslev Skole
Fællesskaber> Frøslev & Omegn
Aktuelt> Områdefornyelse
I hope David is able to help me with this
Futte
Hi there,
try this CSS:
.sidebar .inside-navigation {
padding: 20px;
box-sizing: border-box;
}
.widget-area .secondary-navigation li {
background-color: #f5f5f5;
border-top: 1px solid #d1d1d1;
}
#left-sidebar {
background-color: #ededed;
}
@media(min-width: 769px) {
.site-content {
display: flex;
}
}
That looks really great, thanks. I just would like the grey area to fill out the sidebar - right now it just fills the menu... Is that possible?
Edited the CSS above :)
It looks a little funny now ;-)

But the idea is right!
But I have changed the backgroundcolor in the customizer, and it looks great now!
Glad to hear that!