I have purchased the following plugin http://bit.ly/X0b52x
It enhances the standard search functionality of the search box, and suggests searches etc.
It doesn't work with the Atahualpa 3.7.9 theme unfortunately.
I contacted the plugin developer, who looked into the problem and came back to me saying:
Quote:
You have onfocus="this.value=''" on your search input. So when a user selects a suggestion the text input is given focus again and it clears the selection instantly. With this removed it seems to work as you would expect. You should be able to edit this in your theme. Ideally it will be an file called searchform.php: http://codex.wordpress.org/Function_...et_search_form The placeholder text will stay with your javascript removed. You need to have a look at the HTML5 placeholder attribute instead and if you want it to work across all browsers you can look at grabbing a polyfill (https://github.com/ginader/HTML5-placeholder-polyfill). My default WordPress search form looks like this: <snip> I cannot really follow the code you sent me - its a bit of a mess. All you need to do is remove the onfocus and onblur events and replace it with the placeholder example above. |
Code:
<div class="searchbox-form">' . // Since 3.6.8: Removed check whether get_search_query() exists and added esc_js * * * * '<input type="text" class="text inputblur" onfocus="this.value=\'' . * * * * ( get_search_query() ? esc_js(get_search_query()) : '' ) . '\'" * * * * value="' . (get_search_query() ? esc_js(get_search_query()) : esc_attr($bfa_ata['searchbox_text']) ) . * * * * '" onblur="this.value=\'' . ( get_search_query() ? esc_js(get_search_query()) : esc_attr($bfa_ata['searchbox_text']) ) . '\'" name="s" />' . '</div>
Any help or pointers greatly appreciated.
Steve