[Support request] Mega menu code not working – now menu shows all my published pages int

Home Forums Support [Support request] Mega menu code not working – now menu shows all my published pages int

Home Forums Support Mega menu code not working – now menu shows all my published pages int

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #628669
    Desiree

    Hi, tried to insert a code for a mega menu (in Customize > Additional CSS) and sorting the mega menu by using the ordinary appearances > menus structures. But the Mega menu code isn’t working anymore – instead my main menu now shows all my published pages isntead of the pages choose by the appearances > menus structure- and I’ve tried to remove the code entirely but it still doesn’t change…

    I don’t know if it has anything to do with some other codes or settings but this is the code I :


    @media
    (min-width: 769px) {
    nav .main-nav .mega-menu {
    position: static;
    }

    nav .main-nav .mega-menu > ul {
    position: absolute;
    width: 100%;
    left: 0 !important;
    }

    nav .main-nav .mega-menu > ul > li > a {
    font-weight: bold;
    }

    nav .main-nav .mega-menu>ul>li {
    display: inline-block;
    width: 25%;
    vertical-align: top;
    }

    nav .main-nav .mega-menu.mega-menu-col-2>ul>li {
    width: 50%;
    }

    nav .main-nav .mega-menu.mega-menu-col-3>ul>li {
    width: 33.3333%;
    }

    nav .main-nav .mega-menu.mega-menu-col-5>ul>li {
    width: 20%;
    }

    nav .main-nav .mega-menu > ul > li:hover > a,
    nav .main-nav .mega-menu > ul > li:focus > a,
    nav .main-nav .mega-menu > ul > li[class*=”current-“] > a,
    nav .main-nav .mega-menu ul ul {
    background-color: transparent !important;
    color: inherit;
    }

    nav .main-nav .mega-menu ul .sub-menu {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    width: 100%;
    box-shadow: 0 0 0;
    left: 0;
    height: auto;
    }

    nav .main-nav .mega-menu ul.toggled-on .sub-menu {
    pointer-events: auto;
    }

    nav .main-nav .mega-menu .sub-menu .menu-item-has-children .dropdown-menu-toggle {
    display: none;
    }
    }

    GeneratePress 2.1.3
    #628681
    Leo
    Staff
    Customer Support

    Hi there,

    Have you assigned that specific menu to be the primary menu in theme location?
    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#setting-a-theme-location

    #642201
    chete

    Hello,

    That’s right, the code doesn’t work anymore. I just put it on and it doesn’t work.
    And yes, I have activated the menu and added the class.

    Regards

    #642440
    Leo
    Staff
    Customer Support

    Can you open a new topic and link us to your site in question?

    Tom updated the code not that long ago so make sure you are using the latest one:
    https://docs.generatepress.com/article/building-simple-mega-menu/

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