Site logo

Archived topic

Persistent submenu from parent page

8 replies · Started by Todd on May 9, 2017

Viewing posts 1–9 of 9

I apologize if I am overlooking a simple setting!

I'm unable to make the submenu of a parent page show as a persistent submenu.

If you click on "NORTH AMERICAN MANUFACTURING" from this link: http://netniks.cmslauncher.info, the submenu items, "Sample Page" and "Another Sub-Nav Page" do not show persistently.

I should note that I have a custom submenu which is horizontal, but I have not generated the necessary CSS for the submenu persistence.

Thanks and regards,
Todd

GP Premium 1.2.94

Hi Leo,
Thanks for the response!

In the link you provided, I would want the following submenus to be toggled on (made visible) upon clicking on "Parent Page". The submenus would not just appear while hovering over the parent in the primary nav menu, but show up as active links whether or not you are hovering over the primary nav menu item.

The view would consist of:

Parent Page (menu item - visible)
Sidebar/Sidebar/Content (submenu item - visible)
Content/Sidebar/Sidebar (submenu item - visible)
No Sidebars (submenu item - visible)

Thanks!

Sorry I'm still a bit confused about what you meant.

But you could try Customizer > Layout > Primary Navigation > Navigation Dropdown > Click - Arrow.

This way users can still click on North American Manufacturing and click on the arrows to show the submenu.

Let me know if this is what you are after :)

Good idea, Leo! That should work :)

Hi Leo and Tom,
If you click on the primary nav menu item "North American Manufacturing", you will now be taken directly to a submenu page, and the submenu links are toggled on. I assume this works because my primary nav item is also the same as a submenu link. The visual and behavior are what I was trying to achieve.

http://netniks.cmslauncher.info

I don't believe that I need a CSS solution as much as I thought I did, but is what I did an acceptable solution?

Thanks and regards,
Todd

You still seem to be using the hover dropdown type, which is why it takes you to that page. If you switch it to Click - Menu Item, then clicking the menu item will simply open/close the sub-menu.

"…you could try Customizer > Layout > Primary Navigation > Navigation Dropdown > Click – Arrow."

Done.

What I am describing is the primary nav menu item, "North American Manufacturing", is its own page. Click on it and you are taken to North American Manufacturing, but also, the submenu is toggled on. The submenu is now permanently present –– no hover, no click –– it's now there to provide links to "Sub-Nav Page" and "Sample" no matter where you are in this parent and child page area.

Click on Sub-Nav Page and the submenu remains visible.
Click on Sample and the submenu remains visible.
Click on North American Manufacturing and the submenu remain visible.
Click on Global Manufacturing and the submenu is gone.

Visually, "Test" looks exactly the way I want it, except it only works because I have defined the primary nav menu item as the same page as its submenu page, "Global Programs". How would I achieve this if Test and Global Programs are two discreetly different webpages?

Can you give this CSS a shot?

.main-navigation .main-nav .current-menu-item .sub-menu, 
.main-navigation .main-nav .current-menu-ancestor .sub-menu {
    opacity: 1 !important;
    display: block !important;
    left: auto;
    right: auto !important;
    position: relative;
    width: 100%;
    clear: both !important;
    top: auto;
    float: none;
}
.current-menu-item .dropdown-menu-toggle, 
.current-menu-ancestor .dropdown-menu-toggle {
    display: none;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

This archived topic is closed to new replies.