I use Classic Editor and try to remove tag <p>
from <blockquote>
Now I have
<blockquote><p><q>Smart text.</q></p></blockquote>
and I need
<blockquote><q>Smart text.</q></blockquote>
I need it only for this tag. I tryed use this variant also I used this filter.
function remove_paragraphs_inside_blockquotes( $content ) {
$content = preg_replace( '/<blockquote>\s*<p>(.*?)<\/p>\s*<\/blockquote>/is', '<blockquote>$1</blockquote>', $content );
return $content;
}
add_filter( 'the_content', 'remove_paragraphs_inside_blockquotes', 9 );
But it didn't help for me. Can someone help ?