- This topic has 7 replies, 2 voices, and was last updated 3 years, 7 months ago by
Fernando.
-
AuthorPosts
-
June 12, 2019 at 8:14 am #927164
Marc
I have the following situation:
– Page 1
— Subpage 1a
— Subpage 1b
— Subpage 1c
– Page 2
— Subpage 2a
— Subpage 2b
— Subpage 2c
– Page 3
– Page 4Now I want to have the following. If the user is on Page 1 (or on a subpage) and opens the menu, then the subnavigation should be open and show the subpages. This should only happen on the mobile version (because most people don’t know, that they have to click on the arrow to open the submenu).
How can I make this possible?
Thank you very much in advance for your help!
June 12, 2019 at 9:39 pm #927782Tom
Lead DeveloperLead DeveloperHi there,
Give this a shot:
.toggled .current-menu-item > .sub-menu, .toggled .current-menu-ancestor > .sub-menu { visibility: visible; height: auto; opacity: 1; left: auto; overflow: visible; position: relative; pointer-events: auto; } .toggled .current-menu-item > a > .dropdown-menu-toggle, .toggled .current-menu-ancestor > a > .dropdown-menu-toggle { display: none; }Let me know 🙂
July 2, 2019 at 2:23 am #946767Marc
Dear Tom!
Thank you very much for your help! The menu keeps open if I am on the page. But if I am on a subpage, it does not work 🙁
Do you have an idea?
Kind regards
July 2, 2019 at 9:38 am #947180Tom
Lead DeveloperLead DeveloperHi there,
Is the CSS active right now? I’m not seeing it on the site.
Let me know 🙂
July 3, 2019 at 1:18 am #947673Marc
Dear Tom!
I’ve deactivated it. Now it’s active again. Here is the problem. I click on a 1st level menu item and the submenu keeps open. Now I click on a submenu item (2nd level) and the submenu disappears. I am talking about the mobile version.
Thank you very much in advance for your help!
Kind regards,
Marc
July 3, 2019 at 9:43 am #948152Tom
Lead DeveloperLead DeveloperCan you try the updated CSS above?: https://generatepress.com/forums/topic/keep-sub-menu-open/#post-927782
Let me know 🙂
October 6, 2022 at 10:37 am #2365518Andrew
I’m trying to do the same thing on my site and I’ve added the above but it doesn’t seem to have done anything. Do you know if this is possible using just css?
October 6, 2022 at 7:21 pm #2365767Fernando Customer Support
Hi Andrew,
Can you open a new topic and share the link to the site in question?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
-
AuthorPosts
- You must be logged in to reply to this topic.