erator
(@zoonini)
Automattic Happiness Engineer
Give this a try:
.site-header {
display: none;
}
Don’t edit the theme files directly, otherwise your changes will be overwritten every time the theme is updated.
An easy way to add custom CSS is to install the
Jetpack plugin and activate the
Custom CSS module. You’ll then add your custom CSS in the new stylesheet editor that’ll appear in your dashboard, under Appearance > Edit CSS. You could also install a
standalone custom CSS plugin if you prefer.
A custom CSS editor is also included in the Customizer with WordPress 4.7.
Is there a way to do this on some pages, but not all, like for a landing page?
Kathryn Thanks. It is working but it also removes menu alongwith header. Is there any way menu stays at its place and header removed?
ModeratorKathryn
(@zoonini)
Automattic Happiness Engineer
Kathryn Thanks. It is working but it also removes menu alongwith header. Is there any way menu stays at its place and header removed?
Give this a try:
.site-branding {
display: none;
}
Is there a way to do this on some pages, but not all, like for a landing page?
To hide the whole header on every page except the homepage, try:
.site-header {
display: none;
}
.home .site-header {
display: inherit;
}
[Edit: fixed typo in code]
If you want to keep the menu visible, use .site-branding
in both places instead of .site-header
- This reply was modified 10 months ago by Kathryn. Reason: fixed typo in code
Kathryn,
Thank you so much…it works! But I want to keep the header on the opening post. How do I do that?
ModeratorKathryn
(@zoonini)
Automattic Happiness Engineer
Thank you so much…it works! But I want to keep the header on the opening post. How do I do that?
Could you please provide a link to your site and point out exactly what you mean by the “opening post”? Thanks.
How would I go about hiding the header on one single page?
ModeratorKathryn
(@zoonini)
Automattic Happiness Engineer
How would I go about hiding the header on one single page?
.page-id-XX .site-header {
display: none;
}
Grab the real page ID from the <body>
tag on that specific page. If you need help, please provide a link to the page in question.
I could do this but where do I find the <body> tag? Sorry I know just enough to be dangerous.
ModeratorKathryn
(@zoonini)
Automattic Happiness Engineer
sansmail – thanks for the link. Sorry, there was a typo in my earlier code. Try:
.site-header {
display: none;
}
.home .site-header {
display: inherit;
}
No comments:
Post a Comment