Changing the “Search” string in WordPress search forms

Note : the following code snippet requires advanced WordPress developer skills. There's no guarantee that this snippet works as is with the latest version of our themes, and with the latest version of WordPress. That's why you need to always test any code snippets in a staging environment before implementing it in a production site.


Note about translations : before you start coding anything, note that the “Search” string in the search forms is a WordPress string. If this string is not translated in your language, make sure you update your WordPress language translation on WordPress Polyglots.


In case you want to change the default word “Search” in the Search Button, into something different, this snippet will allow to change it.
Just paste this function into your child-theme functions.php file.

Note: the ‘value=”Search”‘ needs to be replaced accordingly to the default WP language installation:
‘value=”Cerca”‘ for Italian
‘value=”Suche”‘ for German and so on…

Where to copy/paste this code?
Add it to your child-theme functions.php and to your style.css.
Everything you need to know about creating a child theme with Customizr here.

Related Snippets you may also like

One thought on “Changing the “Search” string in WordPress search forms

  • AlHaqTraders

    Hi. I need suggestion. I am not using child theme with my site should i use child theme? why? furthermore i don’t have coding knowledge. I work on user interface. In past when i tried to add coding i got my site damage. I reinstalled everything.

Comments are closed.