• Hallo, is there a special way to implement the menu in the theme?

    …because i tried

    <div id="menu1">
      <?php wp_nav_menu(); ?>
    </div>

    and it does not work

    only this implementations shows the mega menu:

    <div id="menu1">
    wp_nav_menu( array('menu_class' => 'nav-menu','theme_location' => 'primary',) );?>
    </div>

    i also tried to add some custom css like:

    li.mega-current-menu-item {
            background: rgba(255, 18, 178, 1);
            border-radius: 8px;
            }

    , but css is simply ignored.

    thx, alex

    https://wordpress.org/plugins/megamenu/

Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Alex,

    ‘theme_location’ is required when calling wp_nav_menu, so thats why the first one doesn’t work.

    The CSS output by Max Mega Menu is more specific than the CSS you’ve written there, eg, max mega menu will output this:

    #mega-menu-primary-1 li {
         border-radius: 0;
    }

    .. the selector is more specific (it includes an ID) so your CSS will be overridden.

    You can make your CSS work by either making your selector more specific, or by adding !important’s, eg

    li.mega-current-menu-item {
            background: rgba(255, 18, 178, 1) !imporant;
            border-radius: 8px !important;
    }

    Regards,
    Tom

Viewing 1 replies (of 1 total)

The topic ‘Mega Menu Implementation in custom Theme and custom css’ is closed to new replies.