Skip to content
Advertisement

Replace watermark text from searchbar html

I would like to change the placeholder and tooltip text on my search bar.

The search box looks like the image below. In other words, I would like to change “Search …” and “Search for:” to something else.

Search bar

Here is the relevant code from searchform.php:

JavaScript

I found out that replacing “Search for:” changes the tooltip text but how to change the placeholder?

Advertisement

Answer

You could try add placeholder="New text" to input type="search" element.

Additionally you could lookup whether you have some additional javascript that reacts with the element or its class (e.g. with class placeholdit).

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement