Support » Fixing WordPress » Remove p tags from images

  • downFast


    I have read a lot but i still can’t find a solution.
    Wordpress adds p tags around my content, but it does wrap an img within a p tag too.

    I would like not to have the image within the p tag but leave the text only within p tags.

    Any help?

Viewing 1 replies (of 1 total)
  • Scoe


    WordPress automatically applies <p> tags to almost everything, the only way round it that I have found is to either disable <p> tags completely, which I wouldnt recomend, or to manually enter <div> tags around your images. This way you can style them seperately to a standard <p> tag

    the code should look like:
    <div class="banner"><img src="images/banner.jpg" alt="banner" title="banner" width="1000" height="230" class="alignnone size-full wp-image-64" /></div>

Viewing 1 replies (of 1 total)
  • The topic ‘Remove p tags from images’ is closed to new replies.