0
我正在製作模板,但無法使下拉菜單正常工作。 當我添加一個頁面到菜單時,它的工作原理很好,但是當我添加一個下拉菜單時,它只是站在主菜單項旁邊。wordpress中的bootrap下拉菜單
在這裏,你可以看到它: http://www.glazenwasserijnederpel.nl/nijs/
我的頭部代碼:
<header>
<div class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="<?php echo home_url(); ?>"><img class="logo" title="<?php bloginfo('description'); ?>" src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="Logo hetpannenkoekenhuis"></a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<?php wp_nav_menu (array('theme_location' => 'primary')); ?>
</ul>
</div>
</div>
</div>
我對的functions.php代碼:
add_theme_support('menus');
register_nav_menu('primary', 'Primary header navigation');
register_nav_menu('secondary', 'Menu navigation');