Same issue. Worpress is adding an extra “-2″ to my search tag, giving me id=”search-2”. I have checked my functions.php file, but I am unable to find a solution.
This first happened after I updated to 2.8. I was not having this issue before the update.
@larrychartier – As a temporary fix, you might try changing the “#sidebar #search” style in your css file to “#sidebar #search-2”. That’s what I did.
This is driving me nuts!
Here is the search portion of my functions.php file.
// Widget: Search; to match the theme style and replace Widget plugin default
function widget_sandbox_search($args) {
extract($args);
$options = get_option('widget_sandbox_search');
$title = empty($options['title']) ? __( '', 'sandbox' ) : $options['title'];
$button = empty($options['button']) ? __( 'search', 'sandbox' ) : $options['button'];
?>
<?php echo $before_widget ?>
<form id="mainsearch" method="get" action="<?php bloginfo('home') ?>">
<div>
<input id="s" class="text-input" name="s" type="text" value="looking for something?" onfocus="if (this.value == 'looking for something?') {this.value = '';}" onblur="if (this.value == '') {this.value = 'looking for something?';}" tabindex="1" />
<input id="searchsubmit" name="searchsubmit" type="image" src="<?php bloginfo('template_directory'); ?>/imgs/btn-search.gif" alt="search" tabindex="2" />
</div>
</form>
<?php echo $after_widget ?>
<?php
}
AND
// Finished intializing Widgets plugin, now let's load the Sandbox default widgets; first, Sandbox search widget
$widget_ops = array(
'classname' => 'widget_pages',
'description' => __( "Your blog's WordPress Pages (Autumn Forest)", "sandbox" )
);
wp_register_sidebar_widget( 'pages', __( 'Pages', 'sandbox' ), 'widget_sandbox_pages', $widget_ops );
unregister_widget_control('pages');
wp_register_widget_control( 'pages', __( 'Pages', 'sandbox' ), 'widget_sandbox_pages_control' );
$widget_ops = array(
'classname' => 'widget_search',
'description' => __( "A search form for your blog (Autumn Forest)", "sandbox" )
);
wp_register_sidebar_widget( 'search', __( 'Search', 'sandbox' ), 'widget_sandbox_search', $widget_ops );