I wish to make a replacement in all pages of a WordPress installation, after the page content has been read from the database and before it is displayed on visitor screen (of course).
Where in the code do I insert the following statement that will make the replacement?
$page = str_replace($target, $replace, $page);
I run an updated WordPress using 2016 child theme. Among others I have a dedicated single.php and a functions.php
Thank you