I have started to add it into the themes I have designed and am designing, a little twist on the basic searchbox that comes with many WordPress themes. Generally, it’s the searchform.php that you work with, putting a simple form there with an input box and a search button.

So on mine there is no search button as many people realize that the enter button functions as one. Here is the code:

<form method=”get” id=”searchform” action=”<?php echo $_SERVER['PHP_SELF']; ?>”>
 <div>
  <input type=”text” value=”Search this blog…” name=”s” id=”s” onclick=”this.value=””
onblur=”if(this.value.length&lt;1)this.value=’Search this blog…’;” />
 </div>
</form>

When you click inside the box it resets to an empty box, and, if there is no text typed into the box, it will reset to the default value. Yes, the ampersand (&) lt; inside the code is supposed to be there, it allows the code/page to validate as XHTML.