我正在将一个html5网站转换为wordpress主题,但我的菜单被卡住了!
这是html版本:
这是我目前在wordpress上的结果:
正如你所看到的,我无法将社交菜单与主菜单连接起来!
这就是函数。php位:
function register_my_menus() {
register_nav_menus(
array(
\'header-menu\' => __( \'Header Menu\' ),
\'top-left-menu\' => __( \'Top Left Menu\' ),
\'social-menu\' => __( \'Social Menu\' )
)
);
}
add_action( \'init\', \'register_my_menus\' );
这是标题。php位:
<div class="navbar 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-->
<?php
wp_nav_menu( array(
\'theme_location\' => \'top-left-menu\',
\'container\' => \'nav\',
\'container_class\' => \'navbar-collapse collapse dropdown\',
\'menu_class\' => \'nav navbar-nav navbar-left\',
\'container_id\' => \'cssmenu\',
\'walker\' => new CSS_Menu_Walker()
)
);
?>
<?php
wp_nav_menu( array(
\'theme_location\' => \'social-menu\',
\'container\' => \'nav\',
\'container_class\' => \'navbar-collapse collapse\',
\'menu_class\' => \'btn-group nav navbar-nav navbar-right\'
)
);
?>
</div><!--container-->
</div><!--navbar-->
</div><!--navbar-wrapper-->
是否可以在同一行上创建这些?在bootstrap中,它是一个简单的div,有一个navbar left和navbar right类,但我无法在Wordpress中计算出来!
任何帮助都将不胜感激:D