2016-12-30 11:20 阅读 94


I've been working on a wordpress theme using the materializecss framework. I can't get the links in the sidenav to work, the sidenav will slide out no problem but the links don't work. Below is a link to the box.

here is the code for the sidenav

 <?php wp_nav_menu( array(
     'theme_location' => 'mobilemenu',
     'menu_class' => 'side-nav',
     'menu_id' => 'nav-mobile'

 <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>

and this is how the mobilemenu is registered

register_nav_menus( array(
    'primary' => esc_html__( 'Primary', 'loftymaterial' ),
    'mobilemenu' => __( 'Mobile Menu', 'loftymaterial' )
) );

any thoughts you have are greatly appreciated. Thanks

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    duannai1883 duannai1883 2016-12-30 11:27

    Issue is because of the #sidenav-overlay element, it is positioned on top of the side menu, use the below CSS, make sure to put it in a CSS file which loads after the materialize.css file

        z-index: 996;
    点赞 评论 复制链接分享