I’m trying to hide the menu page completely from this page:


I’m using Divi 3.0, and have tried – through online tutorials – to hide it using the following in my styles css sheet:

.page-id-27820 top-menu-nav {
display: none important;

That didn’t do anything, aside from making the menu look a little weird (and dropping the search magnifying glass down a bit), and I removed the code – the search button still looks weird.

if anyone could help me with how to remove the menu completely (and logo etc) from that one page, I’d be very much appreciative!

4 Answers 4


Created a simple image for you on how to get page id and menu attributes. https://dl.dropboxusercontent.com/s/zibhieyo3s6a5bs/Mailbird_2017-01-27_00-57-39.png

You need to get the page_id, exactly as you did:


and hide the menu, like so:

.page-id-27820 #top-menu-nav {
    display: none;

You forgot the # sign, which stand for html attribute id

id = #
class = .
  • That's very kind of you, thank you. Would I then place that code into the themes main styles.css file through editor?
    – Alex
    Commented Jan 26, 2017 at 23:07
  • yes. that's the place for it. better to put it in the child theme, but I don't want to complicate you :) Commented Jan 26, 2017 at 23:10

Go to header.php and find the wp_nav_menu(); function.


    <div class="main-navigation">
        <?php wp_nav_menu(array('theme_location' => 'nav-name')); ?>

You could wrap it in a check for the current page. $post is available as a global variable.

<?php if($post->post_name !== 'splash-page'): ?>
    <div class="main-navigation">
        <?php wp_nav_menu(array('theme_location' => 'nav-name')); ?>

I was having the same issue.

I pasted below code to custom css in divi theme

.page-id-28577 #top-menu-nav {
    display: none;

.page-id-28577 = body class of the page that I don't want to show menu on


Try this:

.container.clearfix.et_menu_container { display: none; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.