• Resolved ammmantilla

    (@ammmantilla)


    I feel like I’ve tried everything, and searched everything, and yet for some reason nothing seems to work? I’m relatively new to coding, so perhaps I’m doing something wrong, but I just cannot seem to be able to make the menu disappear on the entry page for my website without making it appear everywhere else, and vice versa.

    Thank you in advance to anyone who can help out; I greatly appreciate it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you share your website url with us?

    Thread Starter ammmantilla

    (@ammmantilla)

    Yes, my apologies. It’s in staging right now so it’s staging14.millenniasmirror.com

    I don’t see a menu on either of the two pages, but in general, the home page of every properly constructed WordPress theme will have a class assigned to it called home, so if you know what ID or class is assigned to your menu, you can add a rule like this to your custom CSS (Appearance → Customize → Additional CSS):

    
    .home .nav-menu {
       display: none;
    }
    

    And this will hide the menu on just the home page. Of course, as I mentioned, you have to know what class or ID is assigned to your menu in order to write the correct selector (if you enable menus on your site, we can take a look and let you know what it is).

    You could add a front-page.php file to your theme that excludes the menu. WordPress knows to use front-page.php as your home page. Normal pages use page.php as a template, so you can look in that to see how the menu is included.

    there are 2 ways you could do this.

    1. set up your front page to be kind of like a landing page – a blank canvas – which then links to other areas of your website that are using the navigation menu.

    2. as mentioned above, create a new page template specifically for your homepage, which simply doesn’t contain the navigation menu call in the .php code.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Putting menu on every page on my website except the first?’ is closed to new replies.