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 From Divi Booster

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

How to Add the Post Status in Divi's Dynamic Content

Divi's Dynamic Content feature is great for enhancing your post/page templates with post-specific information. While Divi includes an option to show information such as the Post Created Date using Dynamic Content, there is no equivalent option for the Post Status....

Random Divi Posts