Wordpress Boostrap崩溃菜单就像列表一样

时间:2017-01-16 08:24:52

标签: css wordpress menu

我的wordpress菜单没有正确折叠。菜单项只是隐藏的,当它们应该显示时,它们看起来不像列表。

situation

<div class="site-navigation-inner col-sm-12">
    <div class="navbar navbar-default">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only"><?php _e('Toggle navigation','_tk') ?> </span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>

        <?php wp_nav_menu(
            array(
                'theme_location'    => 'primary',
                'depth'             => 2,
                'container'         => 'div',
                'container_class'   => 'collapse navbar-collapse',
                'menu_class'        => 'nav navbar-nav',
                'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
                'menu_id'           => 'main-menu',
                'walker'            => new wp_bootstrap_navwalker()
            )
        ); ?>

    </div><!-- .navbar -->
</div>

也许这只是一件小事,但我是Wordpress的新手。谢谢!

1 个答案:

答案 0 :(得分:1)

@media (max-width: 767px) {
  //get your nav to the left here and float the menu-items
}

这应该有用。