Relevanssi doesn’t really have anything to do with the presentation of the search results. That’s up to your theme and the search results template. Edit that to fix any issues with how the search looks like.
As for your second question, here’s a very modern way to do that: http://kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/
Here’s more: http://stackoverflow.com/questions/2984311/delete-default-value-of-an-input-text-on-click
Thread Starter
IlanK
(@ilank)
Thank you for your reply.
So I take it I should add something like placeholder=”What’s your programming question ? be specific.” into the HTML code for the search field.
Would you mind pointing me to where I could find this code in WordPress?
Thanks,
Ilan
Thread Starter
IlanK
(@ilank)
I tried adding this code to my functions.php
function html5_search_form( $form ) {
$form = '<section class="widget-container widget_search"><form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
<label class="screen-reader-text" for="s">' . __('', 'domain') . '</label>
<div class="search-input"> <input type="search" value="' . get_search_query() . '" name="s" id="s" placeholder="e.g. chocolate" /> </div>
<input type="submit" id="searchsubmit" value="'. esc_attr__('Search', 'IronWhisk') .'" />
</form></section>';
return $form;
}
add_filter( 'get_search_form', 'html5_search_form' );
but the text doesn’t disappear on click
Do notice that this is a very new feature, and doesn’t work on many browsers yet. The Stackoverflow thread had more backwards-compatible solutions.
Thread Starter
IlanK
(@ilank)
Alright, well I guess it doesn’t really matter that much.
You should consider adding it, and perhaps predictive search, to the next update. 🙂