Forums

Why I am getting <p> tags auto inserted around images? (3 posts)

  1. johnasp
    Member
    Posted 3 years ago #

    Hi all,

    I'm getting a rather strange problem where I am getting <p> tags auto-inserted around my <img> tags. Any idea of why this is happening and how to get rid of them?

    I'm using a WooTheme, theme called 'Cool Blue' if that helps? See the code view in the editor before it's been rendered in the browser and the after state after WP has inserted the <p> tags around the <img>

    BEFORE

    <div id="left-col" class="grid_4">
    <h3>Summer Showcase </h3>
    ><img src="wp-content/uploads/2009/05/nia1.jpg" alt="NIA" title="NIA" width="250" height="111" class="alignleft size-full wp-image-1252" />
    </div>

    AFTER

    <div id="left-col" class="grid_4">
    <h3>Summer Showcase</h3>
    <p><img src="wp-content/uploads/2009/05/nia1.jpg" alt="NIA" title="NIA" class="alignleft size-full wp-image-1252" width="250" height="111">
    </p></div>
  2. stvwlf
    Member
    Posted 3 years ago #

    That's the way the WP editor tends to work. The internal WordPress process is call autop.

    This plugin http://wordpress.org/extend/plugins/wp-unformatted/ lets you turn that off on a post by post basis. Read the instructions as there is a custom field you must create on each post where you don't want that behavior.

  3. johnasp
    Member
    Posted 3 years ago #

    Thanks I'll give it a go!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.