admin管理员组文章数量:1415645
Two Navigation Menus in Themes Produce the same menus?
reference the subject on page link above. i created two navs, yet the secondary nav includes all pages. the main nav is fine, but the secondary nav is including the main nav pages as well.
the two menus contain only the pages i want per nav (appearance > menus). any suggestions?
it is my own theme built from 2010. it is located here > /
at a loss at this point.
thanks kindly
Neil
Two Navigation Menus in Themes Produce the same menus?
reference the subject on page link above. i created two navs, yet the secondary nav includes all pages. the main nav is fine, but the secondary nav is including the main nav pages as well.
the two menus contain only the pages i want per nav (appearance > menus). any suggestions?
it is my own theme built from 2010. it is located here > http://journeymaninc.ca/
at a loss at this point.
thanks kindly
Neil
Share Improve this question edited Apr 13, 2017 at 12:37 CommunityBot 1 asked Aug 29, 2012 at 23:15 Neil KilpatrickNeil Kilpatrick 211 bronze badge 1- possible duplicate of Two Navigation Menus in Themes Produce the same menus? – Nicolai Grossherr Commented Jun 3, 2014 at 15:30
1 Answer
Reset to default 0In your theme's functions.php did you register a new WP Menu ? by using a code like this:
register_nav_menus( array(
'secondary' => __( 'Secondary Navigation', 'twentyten' ),
) );
And after that in your theme's header.php under <div id="access" role="navigation">
you should add
<?php wp_nav_menu( array( 'container_class' => 'menu-header-secondary', 'theme_location' => 'secondary' ) ); ?>
本文标签: themesTwo Navigation Menussecondary nav is including main nav
版权声明:本文标题:themes - Two Navigation Menus - secondary nav is including main nav 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745243196a2649435.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论