Support » Fixing WordPress » Hide navigation On Static homepage

  • Resolved Maracas1970


    Hello there

    I have created a menu in a child theme which previously had no menu.
    (it was just a one page bloggy thing) Adding the pages and then adding the menu in the functions.php and including it with wp_nav_menu.

    Here is the site:

    I have set my homepage to be a static page template and other to blog. As is the norm.

    So far so good.

    What i would now like to be able to do is have the navigation i have created for the site to only display on internal pages, not on my static landing page (where the video resides.) I know i have to include a if is front page, else and endif somewhere, but i have tried literally hundreds of different ways, all of which either did nothing, broke the design or left me with a white page php parsing error.

    at the moment i have something like this in the header (Do these statements go in the header on on the page you wish to exclude something?)

    <!-- Start hide menu on front page --> 
    <?php if(!is_front_page()) : ?>
    <-->nav container here<-->
    <?php endif; ?>
    <!-- End hide menu on front page -->

    Is this any way near right? Do i need to be putting the code i don`t want to appear on my static home page in an else statement?

    if someone could help with where and how the order in which the elements i want to hide go, i would be eternally grateful.



  • The topic ‘Hide navigation On Static homepage’ is closed to new replies.