Genesis - How to change search bar text

In this tutorial, we'll go over how to change the search bar placeholder text and search button text (if applicable).

Before making any edits to your Functions.php file, please make sure that you have access to the File Manager in your cPanel or FTP. The Functions.php file is incredibly sensitive and if a mistake is made, it can cause the "white screen of death" on your site. Having easy access to your File Manager means you can easily upload a fresh copy of the Functions.php file if the need arises.

Search placeholder text

1. Go to Appearance > Theme Editor > Functions.php.

2. Locate this section:

//* Customize search form placeholder text
add_filter( 'genesis_search_text', 'mia_search_text' );
function mia_search_text ( $text ) {
    return esc_attr( 'Looking for something?' );
}
Note: The display of this section will vary slightly between themes.

3. Replace Looking for something? with your desired text. Be sure to keep the apostrophe marks on either side of the text.

5. Click Update File to save your changes.

Search button text

Depending on your theme, you may have a "Go" button for your search box, or you may have a magnifying glass icon. If you have a Go button, you can change the text:

1. Go to Appearance > Theme Editor > Functions.php.

2. Locate this section:

//* Customize search form input button text
add_filter( 'genesis_search_button_text', 'vivienne_search_button_text' );
function vivienne_search_button_text( $text ) {
    return esc_attr( 'GO' );
}
Note: The display of this section will vary slightly between themes.

3. Replace GO with your desired text. Be sure to keep the apostrophe marks on either side of the text.

5. Click Update File to save your changes.