Knowledge Base

Replace search keywords (whole words)

In case you need to replace certain whole words that the user enters to others (like synonyms), then use this custom code.

Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

Follow the instructions within the code to add/remove lines to the $replace array variable. Each key is a keyword or keywords separated by comma, and each value is the substitue keyword.