Support » Themes and Templates » Syntax error in 2011 child theme header

  • Resolved befree22

    (@befree22)


    When I remove the following code for the search box in the header.php

    Parse error: syntax error, unexpected $end in /home/woodbrothers/r.com/wp-content/themes/columns/header.php on line 116

    I get this parse error:

    Parse error: syntax error, unexpected $end in /home/woodbrothers/r.com/wp-content/themes/columns/header.php on line 116

    How can I remove the search box from the header without getting this error?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    what code did you remove?

    Oops! It was the code for the search box in header.php:

    <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
            <?php get_search_form(); ?>
            </div>
          <?php
            else :
          ?>
            <?php get_search_form(); ?>
          <?php endif; ?>
    Moderator t-p

    (@t-p)

    try striking out only this part:

    <?php get_search_form(); ?>

    like:

    <!–<?php get_search_form(); ?>–>

    see if thia works.

    It works! Thanks a lot.

    Moderator t-p

    (@t-p)

    you are welcome:-)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Syntax error in 2011 child theme header’ is closed to new replies.