我是Wordpress Development的新手,我阅读了一些讨论但我并不真正理解我想要做的事情。我为我的网站制作了自定义导航栏,但我无法为我的导航栏制作子菜单。我知道我想做一个步行课,但我不太了解它背后的功能。任何帮助表示赞赏。这是我的HTML代码:
<!-- NAVBAR
================================================== -->
<div class="navbar-wrapper">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div><!-- navbar-header -->
<!-- If the menu (WP admin area) is not set, then the "menu_class" is applied to "container". In other words, it overwrites the "container_class". Ref: http://wordpress.org/support/topic/wp_nav_menu-menu_class-usage-bug?replies=4 -->
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'navbar-collapse collapse',
'menu_class' => 'nav navbar-nav navbar-right'
) );
?>
</div><!-- container -->
</div><!-- navbar -->
</div><!-- navbar-wrapper -->
</header>
答案 0 :(得分:1)
对于wp-bootstrap-navwalker,您可以使用以下三个简单步骤。 https://docs.google.com/document/d/161g7nkL5pFXeeZcdXtDhUc6zCSvP6wEdU7ztONNiLAY/edit