[Resolved] Submenu constantly toggled (open)

Home Forums Support [Resolved] Submenu constantly toggled (open)

Home Forums Support Submenu constantly toggled (open)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1602831
    Gabriela

    Hi!

    I need to display the submenu constantly toggled (open) when I am viewing the Portfolio category posts, both in desktop view and in tablet and mobile view (Menu Off Canvas).

    https://danielaschneider.com.br/portfolio/elevado/

    #1603103
    Ying
    Staff
    Customer Support

    Hi Gabriela,

    Give this css a try:

    body.single-post .widget-area .main-navigation ul ul {
        left: auto;
        display: block !important;
        width: 100%;
        transition-delay: 150ms;
    }
    
    body.single-post .main-navigation ul.sub-menu {
        opacity: 1;
        visibility: visible;
        overflow: visible;
        position: relative;
        pointer-events: auto;
        height: auto;
        padding-left: 0.75em;
        padding-bottom: 2em;
    }
    
    @media (max-width: 768px) {
        body.single-post #generate-slideout-menu.main-navigation ul ul {
            display: block;
        }
    }

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

    Let me know 🙂

    #1603125
    Gabriela

    Hi Ying,
    Thanks for the reply!
    Yes it worked fine, but I need all the posts in Portfolio category to have the submenu toggled displayed, not just one post.
    In fact, it would be nicer if the Portfolio item in menu had its submenu automatically populated from the Portfolio category posts. But as I don’t know how to do it, I added each post manually to the submenu.
    Maybe if I can make the submenu from category, the CSS should work like this:

    body.category-portfolio .widget-area .main-navigation ul ul {
    left: auto;
    display: block !important;
    width: 100%;
    transition-delay: 150ms;
    }

    body.category-portfolio .main-navigation ul.sub-menu {
    opacity: 1;
    visibility: visible;
    overflow: visible;
    position: relative;
    pointer-events: auto;
    height: auto;
    padding-left: 0.75em;
    padding-bottom: 2em;
    }


    @media
    (max-width: 768px) {
    .category-portfolio #generate-slideout-menu.main-navigation ul ul {
    display: block;
    }
    }

    But, as long as I added all the submenu items manually, it doesn’t work.

    #1603196
    Ying
    Staff
    Customer Support

    Seems the sub menus are all single post?

    If so, edited CSS here:
    https://generatepress.com/forums/topic/submenu-constantly-toggled-open/#post-1603103

    #1603219
    Gabriela

    Hi Ying!
    Yes, it worked fine!!

    Thank you!

    #1603262
    Ying
    Staff
    Customer Support

    Great!

    Glad to help 🙂

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