Website Building » WooCommerce » How Do I Change the Placeholder Text in WooCommerce?

How Do I Change the Placeholder Text in WooCommerce?

Last updated on January 23, 2023 @ 12:24 pm

If you are using WooCommerce to sell products on your website, you may want to change the placeholder text that appears in the product search box. By default, the placeholder text says “Search products…” but you can change this to something else, such as “Search for products…” or “What are you looking for? “.

To change the placeholder text in the product search box, you will need to edit the WooCommerce plugin files. You can do this via the WordPress plugin editor or by using a FTP client to access your website files.

Once you have edited the WooCommerce plugin files, the new placeholder text will appear in the product search box.

Step 1: Log in to your WordPress website and go to Plugins > Editor. On the Edit Plugins page, select WooCommerce from the dropdown menu at the top of the page.

Step 2: On the WooCommerce plugin editor page, select WC-Template-Loader.php from the list of plugin files on the right-hand side of the page.

Step 3: Find the following line of code in the WC-Template-Loader.php file:

"<?php echo esc_attr_x( 'Search products…', 'placeholder', 'woocommerce' ); ?>"

Step 4: Replace that line of code with the following:

"<?php echo esc_attr_x( 'What are you looking for? ', 'placeholder', 'woocommerce' ); ?>"

Step 5: Save your changes and close the file.

You can follow these simple steps to change placeholder text in WooCommerce.

PRO TIP: If you are not familiar with code or are not comfortable making changes to your theme, we recommend that you seek help from a developer. Making the wrong change can break your site.
Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.