How can I change certain Text Strings?
If particular words or a certain text string don’t suit your view, you can change them using a small plugin called Say What?
This plugin takes advantage of the fact that strings are translatable and use the translation mechanism to force strings to change to whatever text you want. Let me give you an example.
An example of changing a string
Let’s say you want to change the “What are you looking for?” text from the home page hero section to something like “Enter your search term…”.
Step 1 — Install and activate Say What?
Install and activate the Say What? plugin from Appearance → Plugins.
Go to Tools → Text Changes → Add New. Here you will be presented with the following fields:
- Original string
- Text domain (usually theme/plugin name like ‘anima’)
- Text context (we can ignore this)
- Replacement String
Step 2 — Add the Original string
Type in the text you wish to change in the Original string field, exactly as it is on your website (text case is important). Sometimes certain strings might be made uppercase using CSS. It would be best to use the original text (use the page source or Inspector to find it).
Step 3 — Add the Text Domain
In the Text domain field, you will generally need to enter your theme name (eg. “listable” or “pile“) as all the strings use this in the theme files. For other strings provided by plugins, you will need to find out their text domain (read this article for more details).
Step 4 — Add the Replacement string
Skip the Text Content and type in your new version of the text in the Replacement string field.
Sticking to our example, you should end up with something like this: