Hide the Standard Divi Theme Header

Written by Dan Mossop

There are scenarios where you might want to remove the default header provided by the Divi theme—such as designing a custom header, improving focus on page content, or achieving a cleaner page layout. Hiding the standard Divi header allows for greater control over the appearance and user experience of your site. In this guide we show you how to hide the standard Divi theme header to achieve your desired site look.

Hide the Standard Divi Theme Header using Divi Booster

This method explains how to hide the default Divi theme header by utilizing the Divi Booster plugin's built-in header hiding feature. By following these steps, you can quickly remove the standard header across your site without custom code, offering a convenient solution for customizing your site's design.

Access the Divi Booster Settings

To get started, head to your WordPress dashboard. In the left-hand admin sidebar, click on 'Divi' to expand the menu, then select the 'Divi Booster' option to open its settings panel.

Configure Header Visibility

Inside the Divi Booster settings, locate the 'Header' section and click to expand it. Then, find the 'Main Header' subsection and expand that as well. Look for the option labeled 'Hide header completely' and check its box to activate it.

Save Your Changes

Once you've enabled the setting, be sure to click the 'Save Changes' button at the top right of the Divi Booster panel to apply your updates.

Confirm the Header is Hidden

Visit your site's homepage to check that the standard Divi header is no longer visible at the top of your site.

Hide the Standard Divi Theme Header using Custom CSS

This method demonstrates how to hide the standard Divi theme header by adding custom CSS directly into the Divi Theme Options panel. It's a straightforward approach that allows you to visually remove the default header from your site without editing theme files, making it easy to achieve a cleaner look or prepare for a custom header.

Open Divi Theme Options and Locate Custom CSS

In your WordPress dashboard, click on 'Divi' in the sidebar, then choose 'Theme Options.' Once the Theme Options panel appears, scroll down to find the 'Custom CSS' box at the bottom of the page.

Add CSS to Hide the Divi Header

Inside the Custom CSS box, paste the following code exactly as shown. This will remove the standard Divi theme header and adjust the spacing to keep your layout looking its best.

/* Hide the header */
#main-header {
  display:none;
}
#page-container {
  padding-top:0px !important;
  margin-top:-1px !important;
}
/* Adjust padding for transparent headers */
.et_transparent_nav #main-content .container {
  padding-top: 58px !important;
}

Save Your Changes

After pasting the code, don't forget to click the 'Save Changes' button in the top right corner of the Theme Options panel to make your changes live.

Verify the Header is Hidden

Return to your site's homepage and confirm that the standard Divi header is no longer being displayed.

Conclusion

Hiding the standard Divi theme header is easy with either Divi Booster or a quick CSS snippet in Theme Options. Choose the method you prefer and enjoy a cleaner, more custom site layout!

Take Your Divi Theme Customization Further!

Discover endless possibilities with Divi Booster. Easily hide the main header bar and unlock hundreds of additional features to customize your Divi site with ease. Perfect for anyone looking to streamline their design and functionality.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

105 Comments

  1. works well ! thanks !

    Reply
    • Hi guys would really like to hide header ONLY DIVI LOGO but teh whole nav bar goes missing too. also how do i code a static header strip ontop of my navigation bar with my logo written init.

      Reply
      • One way to hide the logo is using this customizer option: Divi > Theme Customizer > Header & Navigation > Primary Menu Bar > Hide Logo Image

        If that doesn't work for you, try adding this CSS (in Divi > Theme Options > General > Custom CSS):

        #logo { visibility: hidden; }

        When you set the visibility to hidden, the logo will be made invisible but will still occupy its usual space in the page which should keep the nav bar from disappearing.

        For a static header image, see this post:

        https://divibooster.com/add-a-full-width-image-above-the-divi-header/

        Reply
  2. Thanks a lot, Dan! It worked just fine!

    Reply
  3. I have the opposite problem. I have no header. I must have accidentally clicked something off. Is the a way to bring it back?

    Reply
    • Hi Jessica, one possibility (if you're using Divi Booster) is the "Header > Main Header > Hide header completely" setting. It looks like you've got the header showing on the site linked in your comment… so hopefully you've already got it sorted out?

      Reply
  4. Perfect! Thank you so much!!

    Reply
  5. Yes! Thank you!

    Reply
  6. I added the code to the custom css box and removed the header, but the page has not been moved up and I have a 150px space before the menu. What have I done wrong?

    Reply
    • Hi Rob, it looks like this is occurring because you have the background color on the header set to transparent. When it's transparent, Divi sets the padding differently, which my code wasn't accounting for. You should be able to get rid of the space by adding this additional CSS:

      #main-content .container {
          padding-top: 58px !important;
      }
      

      I've updated the post with this. Let me know if it doesn't work for you.

      Reply
  7. You can also use a "Blank Page" template on individual pages, a setting available in Page Attributes – when you edit or create a page. This would hide all headers and footers from the page you are creating. You can use that as a homepage or you can make all pages using those settings and you will never see the default header.

    Reply
    • Thanks Shashank :)

      Reply
    • I really hope the "Blank Page" option is incorporated into posts as well soon. Feels like Divi neglects the blog formatting side of things a bit…

      Reply
      • In the "Divi Post Settings" box on posts, there is now a "Full Width" option for the "Page Layout". I think this will do what you need.

        Reply
  8. this is not working for me am I doing something wrong?

    Reply
    • Hi Barry, are you able to share a link to the site you're trying to use it on so that I can take a look? Thanks.

      Reply
  9. It is possible to hide this header on ONE page but not all of them? I would like to keep it everywhere except my landing page.

    Reply
    • Hi PW, depending on how you've implemented your landing page, one of these should do what you need:

      /* Hide header on home page */
      .home #main-header { display:none; }
      .home #page-container { padding-top:0px !important }
      
      /* Hide header on post with id 123 */
      .postid-123 #main-header { display:none; }
      .postid-123 #page-container { padding-top:0px !important }
      
      /* Hide header on page with id 123 */
      .page-id-123 #main-header { display:none; }
      .page-id-123 #page-container { padding-top:0px !important }
      
      Reply
      • I have applied the "blank page" template to all of my pages however now I am unable to hide the header/footer on my projects (under gallery). I tried to modify the above code to be specific to projects… I also tried to add #main-header { display:none; } to /* Header Styles */

        What do you recommend? Thank you.

        Reply
        • Hi KMO,

          I think you have an error elsewhere in your CSS which is preventing this from working. Specifically at the end of your style.css file you have:

          /* Testimonials Module */
          	.et_pb_testimonial {
          		padding-top: 10%;
          	}
          
          #main-header { display:none; }
          #page-container { 
          	padding-top:0px !important; 
          	margin-top:-1px !important 
          }
          
          /* Hide header on page with id 1023 */
          .page-id-1023 #main-header { display:none; }
          .page-id-1023 #page-container { padding-top:0px !important }
          

          There should be an extra closing brace "}" after the testimonial module bit (to close an earlier block of CSS). So the above should be replaced by:

          /* Testimonials Module */
          	.et_pb_testimonial {
          		padding-top: 10%;
          	}
          }
          
          #main-header { display:none; }
          #page-container { 
          	padding-top:0px !important; 
          	margin-top:-1px !important 
          }
          
          /* Hide header on page with id 1023 */
          .page-id-1023 #main-header { display:none; }
          .page-id-1023 #page-container { padding-top:0px !important }
          

          The CSS which comes after it should now work and remove the header on your projects.

          As a side note, it looks like you might be editing the Divi style.css file directly. This will work, but be aware that your changes will be lost if you update Divi. A better way is to add CSS via either the Custom CSS box in the Theme Options, or via a child theme. This post elaborates a bit on that:

          https://divibooster.com/adding-css-to-the-divi-theme/

          Hope that helps!

          Reply
          • Now I realized an additional mistake – that ID is only specific to the section, not the project itself [I assigned the 1023 ID via Setting>General Settings>CSS ID for the section of my respective project]. Therefore, the heading is still present! I'm not seeing anywhere to assign an ID to the complete project. I considered adding code to the Custom CSS box but came across the same limitation. I'm not totally comfortable with child themes yet :/ Thanks a lot for your help!

          • Hey KMO, in your CSS, you have the following:

            #main-header { display:none; }
            #page-container { 
            	padding-top:0px !important; 
            	margin-top:-1px !important 
            }
            
            /* Hide header on page with id 1023 */
            .page-id-1023 #main-header { display:none; }
            .page-id-1023 #page-container { padding-top:0px !important }
            

            Note that the first line actually removes the Divi header everywhere from the site – and it seems to be doing so (e.g. on the gallery page you mentioned). If you're still seeing the Divi header anywhere, I'd first try clearing your browser history to make sure you're not just seeing an old version of the page. If you still see the header, any chance you can drop me a link to the specific page you're seeing it on.

            As for the .page-id-1023 part, the id of 1023 actually comes from WordPress's own ID for the post. You can usually see this in the URL when you're editing a post, or by looking in the HTML source of the page for the "body" tag, which will show the ID in the "class" part of the tag. Adding a CSS ID via Divi won't work in this case.

            I hope that makes sense…!

      • Thanks for this, Dan! It's really helpful. On my site, I'd like to hide the header on all posts within a specific category. How would you adapt this code to do that?

        Reply
        • You're welcome, Michael. To hide the header on a specific category, you'd do something like this:

          .category-43 #main-header { display:none; }
          .category-43 #page-container { 
          	padding-top:0px !important; 
          	margin-top:-1px !important 
          }
          

          If you go into your WordPress admin and go to the edit screen for your chosen category, you'll see "tag_ID" in the URL shown in your browser's address bar. The number beside this is the category id, and should be used in place of "43" in the above CSS rules. I hope that makes sense.

          Reply
      • Hi Dan. I found that I had to use page-id-xxx instead of post. But it then worked beautifully. Many thanks

        Reply
      • awesome, that works!!! thanks so much!!

        Reply
  10. Thanks so much!!

    Reply
  11. Thanks! Been tearing my hair out over this. Works brilliantly.

    Reply
  12. thanks! very helpfull!

    Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest Posts

Set Custom CSS IDs for Individual Divi Accordion Items

Assigning unique CSS IDs to specific Divi Accordion items allows for precise control over styling, targeting, and linking within your page content. This ability is particularly useful when you want to apply custom designs or create anchor links to particular accordion...

Enable Swipe Navigation in the Divi Gallery Lightbox

Enabling swipe navigation in the Divi Gallery module's lightbox allows users to seamlessly browse through gallery images by swiping left or right, creating a more interactive and mobile-friendly experience. This functionality can significantly improve user engagement...

Disable Slide-In Animation for Divi Gallery Grid Images

Control how images appear in your Divi Gallery module by toggling the slide-in animation effect for grid layouts. Disabling the slide-in animation allows gallery images to load instantly and appear statically, providing a faster and distraction-free browsing...

Control Image Count Display in Divi Gallery Lightbox

Displaying or hiding the image count in the Divi Gallery module’s lightbox can help customize the user experience, depending on whether you want to give visitors an indication of gallery progress or prefer a cleaner, distraction-free view. The ability to toggle this...

Hide Gallery Image Titles in the Divi Lightbox Overlay

Displaying image titles in the lightbox overlay of the Divi Gallery module can sometimes be distracting or unnecessary, depending on your website’s design and user experience goals. Hiding these titles creates a cleaner and more focused viewing experience for visitors...

Random Posts