How to replace string on HTML output?
-
If WP Super Cache caching disabled, I can replace without problem.
But when caching enabled, no replace happen.
Below is my functions:
if (!is_admin()) { function letsdoreplace($buffer) { $toreplace = array( "giraffe", // Regular CSS "rabbit", ); $withtext = array( "giraffe and friends", // Regular CSS "elephant and rabbit", ); return (str_replace($toreplace, $withtext, $buffer)); } ob_start("letsdoreplace"); };
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘How to replace string on HTML output?’ is closed to new replies.