[Support request] Keep sub-menu open

Home Forums Support [Support request] Keep sub-menu open

Home Forums Support Keep sub-menu open

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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 4

    Now 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!

    #927782
    Tom
    Lead Developer
    Lead Developer

    Hi 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 πŸ™‚

    #946767
    Marc

    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

    #947180
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Is the CSS active right now? I’m not seeing it on the site.

    Let me know πŸ™‚

    #947673
    Marc

    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

    #948152
    Tom
    Lead Developer
    Lead Developer

    Can you try the updated CSS above?: https://generatepress.com/forums/topic/keep-sub-menu-open/#post-927782

    Let me know πŸ™‚

    #2365518
    Andrew

    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?

    #2365767
    Fernando
    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

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