Read WordPress search form change placeholder for more information.

By default, if you are going to change the text of your search form in WordPress, we would recommend using a search plugin such as WP fastest site search. However, if you want more control or rather use code you can hook into the theme’s various filters to alter the search form placeholder in various parts of the theme.
wordpress search form change placeholder

Modify the placeholder attribute in the following code inside the functions.php in your WordPress theme. The placeholder can be changed to any string and the search button can also be changed to anything.

function html5_search_form( $form ) { 
     $form = '<section class="search"><form role="search" method="get" id="search-form" action="' . home_url( '/' ) . '" >
    <label class="screen-reader-text" for="s">' . __('',  'domain') . '</label>
     <input type="search" value="' . get_search_query() . '" name="s" id="s" placeholder="Search website" />
     <input type="submit" id="searchsubmit" value="'. esc_attr__('Go', 'domain') .'" />
     </form></section>';
     return $form;
}

 add_filter( 'get_search_form', 'html5_search_form' );

You may also like

Black Friday sale ends in 1 Days 0 Hours 50 Minutes 3 Seconds Get your free search now!
Sign up