我需要帮助找出我的主导航栏。我用默认的导航钩子创建了它,但现在希望能够隐藏页面,这样它们就不会显示在主导航上。但是,每当我添加新页面时,它都会自动显示在导航中(但我不希望出现这种情况,例如Gallery选项卡下的2009 Gallery、2010 Gallery和2011 Gallery。)
This is my website
这是我在标题中的代码。php文件
<div id="access" role="navigation">
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( \'Skip to content\', \'twentyten\' ); ?>"><?php _e( \'Skip to content\', \'twentyten\' ); ?></a></div>
<?php /* Our navigation menu. If one isn\'t filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( \'container_class\' => \'menu-header\', \'theme_location\' => \'primary\' ) ); ?>
</div><!-- #access -->
这让我的导航看起来很棒。
现在我试着用这个来代替它
<div id="access" role="navigation">
<?php wp_nav_menu(array(\'menu\' => \'Main\')); ?>
</div><!-- #access -->
我得到的只是这个
这是我的#访问菜单的CSS
#access {
background: url(http://www.fhlsociety.ca/img/FHL-extras.jpg) no-repeat;
background-position: 0px -236px;
display: block;
margin: 0 auto;
width: 940px;
height: 100px;
padding-left: 30px;
text-transform: uppercase;
margin-bottom: 20px;
}
#access .menu-header,
div.menu {
font-size: 1.2em;
margin-left: 30px;
width: 900px;
height: 60px;
}
#access a {
color: #aaa;
display: block;
line-height: 100px;
padding: 0 10px;
text-decoration: none;
}
#access a:hover {
color: #fff;
}
#access ul ul a {
background: #f3f3f3;
line-height: 1em;
padding: 10px;
width: 160px;
height: auto;
margin-top: 30px;
}
#access li:hover > a,
#access ul ul :hover > a {
color: #333;
background: none;
}
#access ul li:hover > ul {
display: block;
}
/*#access li:hover > a,
#access ul ul :hover > a {
background-color: #990000;
border-radius: 5px 5px 5px 5px;
color: #C7BD89;
margin: 0 auto;
height: 20px;
padding: 8px 17px;
}
#access ul li:hover > ul {
display: block;
}*/
#access ul li.current_page_item > a, #access ul li.current-menu-ancestor > a, #access ul li.current-menu-item > a, #access ul li.current-menu-parent > a {
color: red;
}
我还缺什么?或者为什么我的造型不再存在?感谢您的帮助!