WordPress.org

Ready to get started?Download WordPress

Forums

Text in Search box (3 posts)

  1. lawtai
    Member
    Posted 10 years ago #

    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?

  2. suedkind
    Member
    Posted 10 years ago #

    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.
    I.e.:
    onblur="if(this.value=='')this.value='type search here';" onfocus="if(this.value=='type search here')this.value='';"

  3. lawtai
    Member
    Posted 10 years ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.