Viewing 15 replies - 1 through 15 (of 22 total)
  • Moderator Kathryn Presner

    (@zoonini)

    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?

    Moderator Kathryn Presner

    (@zoonini)

    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 8 years, 2 months ago by Kathryn Presner. Reason: fixed typo in code
    Thread Starter sansmail

    (@sansmail)

    Kathryn,

    Thank you so much…it works! But I want to keep the header on the opening post. How do I do that?

    Moderator Kathryn Presner

    (@zoonini)

    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?

    Moderator Kathryn Presner

    (@zoonini)

    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.

    Thread Starter sansmail

    (@sansmail)

    ezerkenegdo.net

    Thread Starter sansmail

    (@sansmail)

    I could do this but where do I find the <body> tag? Sorry I know just enough to be dangerous.

    Moderator Kathryn Presner

    (@zoonini)

    sansmail – thanks for the link. Sorry, there was a typo in my earlier code. Try:

    
    .site-header {
      display: none;
    } 
    .home .site-header {
      display: inherit;
    }
    Thread Starter sansmail

    (@sansmail)

    woohoo!! thank you so much. it worked!

    Thanks Katherine, worked perfect!

    Moderator Kathryn Presner

    (@zoonini)

    I could do this but where do I find the <body> tag? Sorry I know just enough to be dangerous.

    That guidance was for cameronwaynesmith – sorry for the confusion. But in case you’re interested, you can see the body tag by viewing the browser source or by using a browser inspector!

    Contact Needle Hook

    from: https://2017.wordpress.net/contact/

    Just what I was looking for, thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘remove header from pages’ is closed to new replies.