Answers for "Remove images from the the_content()"

PHP
0

Remove images from the the_content()

<?php 
$content = get_the_content();
$content = preg_replace("/<img[^>]+\>/i", "(image) ", $content);          
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
Posted by: Guest on September-07-2021

Code answers related to "Remove images from the the_content()"

Browse Popular Code Answers by Language