如何从我的页面中移除页眉或菜单
注意:默认情况下,仅首页移除了页眉。
要从任何页面中移除页眉或菜单,您需要一个允许您添加自定义 CSS 的插件,例如 Jetpack。
要移除页眉,您需要文章的 文章 ID,然后添加此自定义 CSS(将此处的 9999 替换为您的文章 ID):
body.page-id-9999 #masthead {
display: none;
}
要从页面中移除菜单(将此处的 9999 替换为您的文章 ID):
body.page-id-9999 #header-wrapper {
display: none;
}
或者仅从主页移除菜单时:
body.page-id-9999 #header-wrapper {
display: none;
}