Just add this to your code:
$content = preg_replace("~<blockquote>([\s\S]+?)</blockquote>~", "", $content); $content = strip_tags($content, '<img>'); echo $content;
As wali hassan said, add the following code to your function. php:
add_filter( 'the_content', 'block_the_content_filter' ); function block_the_content_filter($content) { $content = preg_replace("~<blockquote>([\s\S]+?)</blockquote>~", "", $content); $content = strip_tags($content, '<img>'); return $content; }
This overrides the "the_content ()" function by default, so in the page template you only need to call:
the_content();
Jonny vince
source share