DeveloperSam
New member
Add the following to your functions.php to separate images from the P tags when dumping our the content. This will make it much easier to style the images.
Code:
function wpfme_remove_img_ptags($content){
return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(\/a>)?\s*<\/p>/iU', '\1\2\3', $content);
}
add_filter('the_content', 'wpfme_remove_img_ptags');