WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Syntax error in 2011 child theme header (6 posts)

  1. befree22
    Member
    Posted 2 years ago #

    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?

  2. Tara
    Member
    Posted 2 years ago #

    what code did you remove?

  3. befree22
    Member
    Posted 1 year ago #

    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; ?>
  4. Tara
    Member
    Posted 1 year ago #

    try striking out only this part:

    <?php get_search_form(); ?>

    like:

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

    see if thia works.

  5. befree22
    Member
    Posted 1 year ago #

    It works! Thanks a lot.

  6. Tara
    Member
    Posted 1 year ago #

    you are welcome:-)

Topic Closed

This topic has been closed to new replies.

About this Topic