首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将复杂菜单更改为简单的文本菜单

如何将复杂菜单更改为简单的文本菜单
EN

Stack Overflow用户
提问于 2011-12-08 12:29:27
回答 1查看 745关注 0票数 1

在我当前的wordpress主题中,存在以下菜单:

我希望它是一个简单的基于文本的菜单,就像这样:

以下是菜单的style.css:

代码语言:javascript
复制
/* =Menu
-------------------------------------------------------------- */

#access {
    background: #ffffff; /* Show a solid color for older browsers */
}
#access ul {
    font-size: 13px;
    list-style: none;
    margin: 0 0 0 -0.8125em;
    padding-left: 0;
}
#access li {
    float: left;
    position: relative;
}
#access a {

}
#access ul ul {

}
#access ul ul ul {

}
#access ul ul a {

}
#access a:focus {
}
#access li:hover > a,
#access a:focus {
}   
#access ul li:hover > ul {
}
#access .current_page_item > a,
#access .current_page_ancestor > a {
    font-weight: bold;
}

这是当前菜单的php代码。我不知道如何拆卸它而不把它弄坏。提前感谢你的帮助。

代码语言:javascript
复制
<nav id="access" role="navigation">
                <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
                <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
                <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
                <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></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( 'theme_location' => 'primary' ) ); ?>
            </nav><!-- #access -->
EN

回答 1

Stack Overflow用户

发布于 2011-12-31 06:27:31

通过修改传递给函数调用的数组,可以删除包含导航菜单的HTML。阅读更多:wp_nav_menu#removing the navigation container

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8426169

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档