Support » Fixing WordPress » Text in Search box

  • How do I have it so that in the search box I can display some text such as “type search here” or something like that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Edit your index.php in the WordPress directory and search for <input type=”text” name=”s” id=”s” size=”15″ />.
    Change it to <input type=”text” value=”type search here” name=”s” id=”s” size=”15″ /> .
    You might want to use some Javascript to delete the value if the user clicks into the field.
    onblur=”if(this.value==”)this.value=’type search here’;” onfocus=”if(this.value==’type search here’)this.value=”;”


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Text in Search box’ is closed to new replies.