Title: Code in header.php gives syntax error
Last modified: August 21, 2016

---

# Code in header.php gives syntax error

 *  [Sophie-P](https://wordpress.org/support/users/sophie-p/)
 * (@sophie-p)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/code-in-headerphp-gives-syntax-error/)
 * Dear all,
 * For my site [http://www.kavel10.nl](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](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!
 * Sophie

Viewing 1 replies (of 1 total)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/code-in-headerphp-gives-syntax-error/#post-4389232)
 * Sorry, but you need to stick with your existing thread on this question – continue
   here:
 * [http://wordpress.org/support/topic/customize-header-css?replies=3](http://wordpress.org/support/topic/customize-header-css?replies=3)

Viewing 1 replies (of 1 total)

The topic ‘Code in header.php gives syntax error’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [remove menu](https://wordpress.org/support/topic-tag/remove-menu/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/code-in-headerphp-gives-syntax-error/#post-4389232)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
