Title: Predictive Header Search Function
Last modified: August 21, 2016

---

# Predictive Header Search Function

 *  [roxana_fit](https://wordpress.org/support/users/roxana_fit/)
 * (@roxana_fit)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/predictive-header-search-function/)
 * I was wondering if someone could help me. I upgraded my wordpress theme and it
   screwed up my search function in the header.php.
 * I tried to replace my existing header with the predictive search code in my header
   but i get an the following error:
 * Parse error: syntax error, unexpected ‘}’ in /home/content/21/11026521/html/wp-
   content/themes/kallyas/header.php on line 98
 * I replaced:
 *     ```
       <!-- search -->
       <?php if ( empty( $data['head_show_search'] ) || ( !empty($data['head_show_search']) && $data['head_show_search'] == 'yes') ) { ?>
       					<div id="search">
       						<a href="#"><span class="icon-search icon-white"></span></a>
       						<div class="search">
       							<form id="searchform" action="<?php echo home_url(); ?>" method="get">
       								<input name="s" maxlength="20" class="inputbox" type="text" size="20" value="<?php echo __( 'SEARCH ...', THEMENAME );?>" onblur="if (this.value=='') this.value='<?php echo __( 'SEARCH ...', THEMENAME );?>';" onfocus="if (this.value=='<?php echo __( 'SEARCH ...', THEMENAME );?>') this.value='';" />
       								<input type="submit" id="searchsubmit" value="go" class="icon-search"/>
       							</form>
       						</div>
       					</div>
   
       					<!-- end search -->
       ```
   
 * WITH THE FOLLOWING:
 *     ```
       <?php
       $ps_echo = true ;
       if ( function_exists( 'woo_predictive_search_widget' ) ) woo_predictive_search_widget( $ps_echo );
       ?>
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * its not working and I cant figure it out how to fix it. It was working prior 
   to the theme update.
 * Can someone help me.
 * Thanks
    Roxana
 * [https://wordpress.org/plugins/woocommerce-predictive-search/](https://wordpress.org/plugins/woocommerce-predictive-search/)

The topic ‘Predictive Header Search Function’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-predictive-search/assets/icon.svg?rev=2083455)
 * [Predictive Search for WooCommerce](https://wordpress.org/plugins/woocommerce-predictive-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-predictive-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-predictive-search/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-predictive-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-predictive-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-predictive-search/reviews/)

## Tags

 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [predictive search](https://wordpress.org/support/topic-tag/predictive-search/)
 * [product search](https://wordpress.org/support/topic-tag/product-search/)
 * [search function](https://wordpress.org/support/topic-tag/search-function/)

 * 0 replies
 * 1 participant
 * Last reply from: [roxana_fit](https://wordpress.org/support/users/roxana_fit/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/predictive-header-search-function/)
 * Status: not resolved