Changing the “Search” string in WordPress search forms


Note :This snippet works only with the Classical style option. More about the theme style option here


 

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 alhaqtraders.com 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.