wordpress中的nav-bar不会显示给移动设备

时间:2016-05-09 11:56:35

标签: wordpress menu navbar responsive

我在向Convert Bootstrap navbar to WordPress menu描述时创建了导航栏 我可以在桌面上看到菜单,但菜单不会显示在移动设备中。 在移动设备中,我可以看到显示菜单的按钮,但不显示菜单。

     <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="nav navbar-nav">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <?php
    wp_nav_menu( array(
            'menu'              => 'primary',
            'depth'             => 2,
            'container'         => 'div',
            'container_class'   => 'navbar-collapse collapse',
            'menu_class'        => 'nav navbar-nav',
            'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
            'walker'            => new wp_bootstrap_navwalker())
        );
     ?>
 </div><!-- /.container-fluid -->

0 个答案:

没有答案