How can I change certain Text Strings?

If par­tic­u­lar­ly words or a cer­tain text string doesn’t suit your view, you can change them by using a small plu­g­in called Say What?

This plu­g­in takes advan­tage of the fact that strings are trans­lat­able and use the trans­la­tion mech­a­nism to force strings to change to what­ev­er text you want. Let me give you an exam­ple.

An example of changing a string

Let’s say you want to change the “Or browse the high­lights” text from the home page hero sec­tion to some­thing like “We think these will inter­est you”.

Step 1 — Install and activate Say What?

Install and acti­vate the Say What? plu­g­in from Appear­ance → Plu­g­ins.

Go to Tools → Text Changes → Add New. Here you will be pre­sent­ed with the fol­low­ing fields:

  • Orig­i­nal string
  • Text domain
  • Text con­tent (we will ignore this)
  • Replace­ment String

Step 2 — Add the Original string

Type in the text you wish to change in the Orig­i­nal string field, exact­ly as it is on your web­site (text case is impor­tant). Some­times cer­tain strings might be made upper­case using CSS. You need to use the orig­i­nal text (use the page source or Inspec­tor to find it).

Step 3 — Add the Text Domain

In the Text domain field, you will gen­er­al­ly need to enter listable (this is used by all the strings in the theme files). For oth­er strings pro­vid­ed by plu­g­ins you will need to find out their text domain (read this arti­cle for more details).

Step 4 — Add the Replacement string

Skip the Text Con­tent and type in your new ver­sion of the text in the Replace­ment string field.

Stick­ing to our exam­ple, you should end up with some­thing like this:

Zoom

Updated on May 31, 2017

Was this article helpful?