Hide the Divi Header Navigation Links

Written by Dan Mossop

If you'd like to hide the navigation links (including the search icon) in the Divi Theme's standard header, here are several options.

Hide the Divi Header Menu within Divi Settings

It's possible to remove the menu links and search icon within Divi itself. To do so:

1. Remove the search icon through the customizer, by disabling it at:

Divi > Theme Customizer > Header & Navigation > Header Elements > Show Search Icon

2. Remove all items from your menu, at:

WP Dashboard > Appearance > Menus

(Alternatively create a new blank menu and assign it to the "Primary Menu" display location.

Hide the Divi Header Menu Links using CSS

To hide the navigation links / search icon in the Divi header, you can add the following CSS:

#et-top-navigation {
    visibility: hidden;
}

Hide the Divi Header Menu Links using Divi Booster

Divi Booster contains an option to hide the Divi header menu links and search icon.

You'll find it in the Divi Booster settings at:

Divi > Divi Booster > Deprecated > Divi 2.3 > Hide header links and search

Note that it’s in the “Deprecated” section as it’s now possible to achieve the same effect within Divi itself, as described above. But the Divi Booster feature still works and you may wish to use it if you find it more convenient.

Simplify Navigation Customization with Divi Booster!

Remove unwanted header navigation links effortlessly with Divi Booster. Streamline your site without hassle - perfect for quick customization!

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, 

52 Comments

  1. Hi, i used your code:
    /* Hide entire header on homepage */
    .home #main-header { display: none; }

    but in mobile site i've a white 'padding' from top and page doesn't fit well (from top).
    How can i do? Thanks!!

    Reply
    • Hi Riccardo, you can use this to change the padding on mobiles (and tablets):

      @media only screen and (max-width: 980px) {
          #main-content .container { 
              padding-top: 58px !important; 
          }
      }
      

      You can adjust the 58px to increase / decrease the amount of padding.

      Reply
      • Thank you, i've resolve with margin and not padding! Thank you!! :)

        .home #main-header { display:none; }

        @media only screen and (max-width: 990px) {
        body{
        margin-top: -163px;
        }

        Reply
  2. Hi Dan,
    Any suggestions on how to hide the secondary menu on desktop displays, but still maintain it on the mobile and tablets?
    I can hide it overall, but am struggling to differentiate between mobile and desktop in the css.

    Reply
    • Hi Lauren, I think what you want here is a CSS "media query". Media queries can be wrapped around a regular bit of CSS code and specify the conditions under which the CSS applies. For example:

      @media only screen and (min-width: 981px) {
          #top-header { display: none; }
      }
      

      This takes the regular CSS for hiding the top header (i.e. "#top-header { display: none; }") and wraps it in a media query (the @media bit) which specifies that the CSS should only apply when the browser window is at least 981px wide. 981px corresponds with the width at which Divi switches to desktop displays, so the result is that the top header will be hidden on desktop displays, but not on mobile / tablets.

      Reply
  3. Hi, can you advise how to hide the primary menu only so it doesn't appear on the homepage? Thank you.

    Reply
    • Hi Lisa, one of these two CSS snippets should do the trick:

      /* Hide entire header on homepage */
      .home #main-header { display: none; }
      
      /* Hide the menu links / search icon on homepage */
      .home #et-top-navigation { visibility: hidden; }
      
      Reply
      • Thanks Dan! Your second suggestion worked :)

        Reply
      • Thank you so much!

        Reply
  4. Thank you divibooster!

    Reply
  5. Hi.. is there a way to have this work only on the desktop side? I would like to still have the links visible on mobile.

    Reply
    • Hi Samuel, you can make this apply to the desktop only, by changing it to:

      @media only screen and (min-width: 981px) {
          #et-top-navigation { visibility: hidden; }
      }
      
      Reply
      • Hi Dan.. Awesome, Thanks a bunch :)

        Reply
  6. This is awesome!! Thanks so much :)

    Reply
  7. Great tip! Thank you :)

    Reply
  8. Can you provide a way to remove the phone and email icons? I want to put a tagline there instead.

    Reply
  9. This seems to have hidden my logo as well….

    Reply
    • Hi Jordan, sorry about that. Changes to the way Divi implements its header stopped the feature from working. I've just updated the post with a (simpler) solution which works with the latest versions of Divi.

      Reply
  10. Does it matter where I paste this code?

    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