title: Remove P tags from Advanced Custom Fields images
body: <p>I'm using WordPress 4.2.2 and every time I add an image to the WYSIWYG it wraps the output image in a paragraph tag. I need to strip out these tags. Everything I seem to find online is from 2011 plus it doesn't seem to work.</p>
  
  <p>I have tried putting things in the functions.php like:</p>
  
  <pre><code>function filter_ptags_on_images($content){
    return preg_replace('/&lt;p&gt;\s*(&lt;a .*&gt;)?\s*(&lt;img .* \/&gt;)\s*(&lt;\/a&gt;)?\s*&lt;\/p&gt;/iU', '\1\2\3', $content);
  }
  add_filter('the_content', 'filter_ptags_on_images');
  </code></pre>
  
  <p>Nothing seems to work. How can I accomplish this. </p>
  
  <p>BTW I am using ACF Pro's WYSIWYG and JointsWP starter theme and my images ARE NOT wrapped in a link tag if that makes a difference.</p>