繁体   English   中英

从主页隐藏网站导航

[英]Hide website navigation from the home page

我在wordpress中创建了一个网站,我想从这个页面隐藏菜单

http://www.dawaf.co.uk/es/

但是,一旦您单击左上角的徽标即可将其显示在所有其他页面上,以引导您访问该站点

http://www.dawaf.co.uk/es/portraits

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    border: 0;
    font-family: BebasRegular;
    font-size: 100%;
    font-style: inherit;
    font-weight: inherit;
    margin: 0;
    outline: 0;
    padding: 0;
    vertical-align: baseline;
}

body {
    background: #FFFFFF;
    padding: 0px;
}

h1.entry-title {
    display: none;
}

#page.hfeed {
    margin: 0px;
}

/*Header
------------------------------------------------------------ */
#branding {
    border: 0px;
}

#branding #searchform {
    display: none;
}

.site-title {
    width: 300px;
    height: 132px;
}

/*Nav
------------------------------------------------------------ */
#access {
    background: transparent;
    -webkit-box-shadow: none;
    box-shadow: none;
    width: 140px;
    margin-left: 20px;
}

#access a {
    color: #8E8E8E;
    padding: 0px;
    line-height: 2.2;
}

#access li {
    font-size: 11px;
}

#access li:hover > a, #access a:focus {
    background: #FFFFFF;
}

#access .current-menu-item > a, #access .current-menu-ancestor > a, #access .current_page_item > a, #access .current_page_ancestor > a {
    font-weight: normal;
}

/*Photospace
------------------------------------------------------------ */
.photospace {
    margin: 0px !important;
    top: -236px;
    left: 175px;
}

.nav-controls {
    font-size: 11px;
}

.ss-controls {
    font-size: 11px;
}

.photospace .gal_content a:hover{
    text-decoration: none !important;
}

/*Super Sized Splash Page
------------------------------------------------------------ */
#supersized {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
    z-index: -999;
    height: 100%;
    width: 100%;
}

#page.hfeed {
    background: transparent;
}

.widget_search form {
    display: none;
}

form#searchform {
    display: none;
}

/*Footer
------------------------------------------------------------ */
#colophon {
    display: none;
}

#post-0 .entry-content {
    display: none;
}

您会注意到您的主页面有一个home ,该类对于该部分是唯一的。 这使得执行以下操作非常简单:

.home nav{
    display:none;
}

或者如果你需要更具体的东西:

.home nav#access{
    display:none;
}

我编辑主题并检查is_home()以隐藏菜单。

if( !is_home() )
{
    # Show your menu on pages that are not the home page
}

您可以通过执行以下css将其隐藏在主页中

.home #access {
    display: none;
    }

通过徽标进入后,它仍将出现在您的所有其他页面上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM