Title: Remove Placeholder Text From WordPress Search Function
Last modified: August 31, 2016

---

# Remove Placeholder Text From WordPress Search Function

 *  [Kev5](https://wordpress.org/support/users/kev5/)
 * (@kev5)
 * [10 years ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/)
 * I added a search function to my 404 page. However, no matter how much I’ve tried,
   I can’t find how to remove the “Type to search, then press Enter” placeholder
   text.
 * How do you remove it?
 * Regards.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Sean Davis](https://wordpress.org/support/users/sdavis2702/)
 * (@sdavis2702)
 * [10 years ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240087)
 * Hi there,
 * You should be able to do this in a couple of different ways. First of all, your
   theme has the ability to include a template file that specifically creates the
   output of the site’s default search form. I wrote about it here: [http://buildwpyourself.com/wordpress-search-form-template/](http://buildwpyourself.com/wordpress-search-form-template/)
 * If your theme does overwrite the default search form, you can override that template
   from a child theme and simply make an edit to the text.
 * —
 * You could also use something like the Say What? plugin, assuming the placeholder
   text is translation-ready. [https://wordpress.org/plugins/say-what/](https://wordpress.org/plugins/say-what/)
 * Once activated, you’d copy the exact placeholder text into the “Original string”
   field (this field is case-sensitive… copy the original text EXACTLY). The “Text
   domain” field would be whatever is specified by what is controlling your search
   form. So if your theme is in control, you’d use its text domain. You would leave
   the “Text context” field blank. And for the “Replacement string” field, add the
   new text you want to display as the placeholder.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [10 years ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240089)
 * here’s the code to change the placeholder text:
 *     ```
       function tachp_search_form($html)
       {
           $html = str_replace('placeholder="Search ', 'placeholder="Search site for ', $html);
   
           return $html;
       }
       add_filter('get_search_form', 'tachp_search_form');
       ```
   
 * You could set placeholder=”” to remove it.
 *  Thread Starter [Kev5](https://wordpress.org/support/users/kev5/)
 * (@kev5)
 * [10 years ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240095)
 * Hi sdavis. Thank you for the response. I already tried those things you mentioned(
   I even used your website 🙂 ), however, it didn’t work for some reason. Thanks
   for the suggestions anyway.
 *  Thread Starter [Kev5](https://wordpress.org/support/users/kev5/)
 * (@kev5)
 * [10 years ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240096)
 * Hi sterndata. Thank you for the response. I tried removing all the code between
   the double quotes, but it gives me an error. What part of the code do I need 
   to change?
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240146)
 * What is the URL of your site?
 * Which theme are you using?
 * What code was added to the 404 template for the search?
 *  Thread Starter [Kev5](https://wordpress.org/support/users/kev5/)
 * (@kev5)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240147)
 * Hi cubecolour,
 * [http://www.pathtodiscipline.com/](http://www.pathtodiscipline.com/)
 * Headway Themes
 * `<?php get_search_form(); ?>`
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240148)
 * How to create a customised version of the search form is outlined at the bottom
   of the page at [https://developer.wordpress.org/reference/functions/get_search_form/](https://developer.wordpress.org/reference/functions/get_search_form/)
 * If this does not work for you, the get_search_form() function may already have
   been changed by your theme in a searchform.php, but this can most likely be changed
   by creating a customised version of the theme’s searchform.php in your child 
   theme if you are using one.
 * I don’t know whether headway calls and customises the search form by the standard
   WordPress methods as it is a commercial theme so I don’t have sight of its code,
   and support for commercial themes cannot be provided on these forums. You should
   be able to get headway-specific support for this from the vendor of the theme.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Remove Placeholder Text From WordPress Search Function’ is closed to 
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 4 participants
 * Last reply from: [cubecolour](https://wordpress.org/support/users/numeeja/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/remove-placeholder-text-from-wordpress-search-function/#post-7240148)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
