Looking for a php function (non-jQuery or wpautop modification) approach to remove <p></p>
from within wordpress.
I tried this but it does not work:
function cleanup_shortcode_fix($content) {
$array = array (
'<p>[' => '[',
']</p>' => ']',
']<br />' => ']',
']<br>' => ']'
);
$content = strtr($content, $array);
return $content;
}
add_filter('the_content', 'cleanup_shortcode_fix');