So, I've started playing with Thematic and was looking at some of the contributed child themes. In the Thematic Featured Site theme, a search form is added to the header. Great! However, when I went to modify the code that is supposedly modifying the search form, the code doesn't actually appear to be called. For example if I replace the input text with something else, I still just get the default text... Also, that <label> tag is never output (this is also true on the demo site for the theme.)
I'm talking specifically about this:
// Customize the search form
function childtheme_search_form($form) {
$form = '<form method="get" id="searchform" action="' . get_option('home') . '/" >
<label class="hidden" for="s">' . __('Search:') . '</label>
<div>';
if (is_search()) {
$form .='<input type="text" value="' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />';
} else {
$form .='<input type="text" value="To search us, type and hit enter" name="s" id="s" onfocus="if(this.value==this.defaultValue)this.value=\'\';" onblur="if(this.value==\'\')this.value=this.defaultValue;"/>';
}
$form .= '<input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" />
</div>
</form>';
return $form;
}
add_filter('get_search_form', 'childtheme_search_form');
Am I missing something here or is this a bug of some sort? Running WP 3.0.1 w/ latest Thematic.
TIA for any help.