Change the wording of any bit of text or string

The featured snippet here will help you change any piece of text in The Events Calendar and its add-ons. With a little bit of modification, it would even allow you to change the wording of any piece of text anywhere in WordPress, not just this plugin!

First copy/paste the snippet at the bottom of this page to your theme's functions.php. Somewhere near the top. You may need to remove the opening <?php tag if your theme's functions.php already has one.

This snippet already contains two wording changes, which you can use as a template for the changes you want to make. These change the phrase "Related Events" to "Similar Events" and changes "Venue" to "Location." This is the magic bit right here:

$custom_text = array(
'Venue' => 'Location',
'Related %s' => 'Similar %s',
);

To change a particular set of text, you must first copy it exactly as it appears in the code. Frequently it appears the same on the front-end. For instance, to change the wording of "Related Events" to say "Similar Events", you can simply copy the text from the front end. You will then paste it as a key inside of the $custom_text array inside of the snippet as in the above example. You can add as many lines as you want by following the same pattern.

KB example Similar Events

Sometimes the text you want to change cannot be copy/pasted from the front end. For instance, by default the label in the Tribe Bar has a CSS style that transforms <label>s to all caps. If we copy/pasted "SEARCH" or "WEEK OF" they will not replace the text we want, because that is not how they appear in the code. If we inspect these elements we will see something like this:

<label>Search</label>

In order to change that label, we would have to copy it as it appears in the code, namely "Search", not "SEARCH". Example which changes "Search" to "Find":

$custom_text = array(
'Related %s' => 'Similar %s',
'Search' => 'Find',
);

Note: On rare occasion this can be even more complicated when multiple strings are concatenated together. An example would be a heading like "Events for week of November 24, 2014". When attempting to edit these it might become necessary to dive into the PHP code and determine how the individual strings appear in the code, and what their gettext $text value is.