How to Change Any Text in Entire WordPress Website | Replace Content In WordPress Website
1. Login to the WordPress Admin Panel.
2. Navigate to Appearance Editor.
3. Select the theme you want to edit.
4. Look for the "functions.php" file.
5. Add the following code to the functions.php file:
function replace_text_wps($text){
$text = str_replace('Old Text', 'New Text', $text);
return $text;
}
add_filter('the_content', 'replace_text_wps');
6. Save changes and refresh the website. The changed text should now appear.
14 ноя 2022