WordPress.org

Forums

[closed] Code in header.php gives syntax error (2 posts)

  1. Sophie-P
    Member
    Posted 1 year ago #

    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!

    Sophie

  2. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic