Filtro replace non funziona
-
Non so perché, l’ho messo in functions.php child ma quando carico l’immagine nell’articolo, le stringhe non si modificano
function replace_text($text) { $text = str_replace('img src="https://miosito.it', 'img src=', $text); $text = str_replace('img src', 'img src class="links" ', $text); return $text; } add_filter('the_content', 'replace_text');
- Il topic ‘Filtro replace non funziona’ è chiuso a nuove risposte.