Created
April 11, 2020 17:42
-
-
Save taricco/ed534b53b4742c4cd0373414fe9d6427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replace_text_wsv($text){ | |
$replace = array( | |
// 'WORD TO REPLACE' => 'REPLACE WORD WITH THIS' | |
'Find This' => 'Replace With This', | |
'Find This' => 'Replace With This', | |
'Find This' => 'Replace With This' | |
); | |
$text = str_replace(array_keys($replace), $replace, $text); | |
return $text; | |
} | |
add_filter('the_content', 'replace_text_wsv'); | |
add_filter('the_excerpt', 'replace_text_wsv'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment