Support » Themes and Templates » remove menu from static front page

remove menu from static front page

Viewing 5 replies - 1 through 5 (of 5 total)
  • 1. open header.php
    2. near the bottom find “nav role=”navigation” class=”site-navigation main-navigation”…”
    3. add a php if condition.

    I think this should work, but didn’t try it:

    <?php if(!is_front_page() ) { ?>
    		<nav role="navigation" class="site-navigation main-navigation">
    			<h1 class="screen-reader-text"><?php _e( 'Menu', 'spun' ); ?></h1>
    			<div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'spun' ); ?>"><?php _e( 'Skip to content', 'spun' ); ?></a></div>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- .site-navigation .main-navigation -->
    	<?php } ?>




    Forum Moderator

    No! Do not edit the theme itself. First create a child theme for your changes.

    @axel13: Please do not encourage people to edit themes downloaded from wordpress.org. They need to create child themes or they will lose all of their changes when they next upgrade.

    Moderator Jan Dembowski


    As that’s an actively developed theme please don’t do that to the header.php file. 😉

    Instead create an activate a child theme of Spun and make a copy of the wp-content/themes/spun/header.php into your wp-content/themes/spun-child/ directory. Then make those edits on that copy.

    That way you will not lose your work when the Spun theme get’s updated.

    Edit: Beaten to it by 62 seconds! Drats!

    I do have a working child theme, but I am unable to get that code to work, any other ideas? specific instructions please, i’m very much a beginner.

    you can hide it via css. Please provide a link to your site and I will show you how

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘remove menu from static front page’ is closed to new replies.