Support » How-To and Troubleshooting » Code in header.php gives syntax error

Code in header.php gives syntax error

  • Dear all,

    For my site http://www.kavel10.nl I want to have a clean homepage, without a menu on it. I researched the forum and saw that the most straightforward option to do this was to insert the following code into the header.php file of my theme (I use Advantage).

    <?php if ( !is_front_page() ): ?>
    <nav id="access" role="navigation">
    <?php wp_nav_menu( array( 'theme_location' => 'header_nav', 'container_id' => 'header-nav', 'container_class' => 'nav', 'fallback_cb' => 'minimatica_nav_menu' ) ); ?>
    </nav><!-- #access -->
    <?php endif; ?>

    From this post: http://wordpress.org/support/topic/how-do-i-remove-header-menu-from-home-page-only-1?replies=7

    However, when I paste this behind the rest of the code that’s already there, my site displays a syntax error, it says ‘on line 39’. I don’t know why this happens, or how to solve this. It shouldn’t matter if I place it at the end of the code, should it? Any leads?

    Thank you very much!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Code in header.php gives syntax error’ is closed to new replies.