Title: Image outside the loop
Last modified: August 19, 2016

---

# Image outside the loop

 *  [absence](https://wordpress.org/support/users/absence/)
 * (@absence)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/image-outside-the-loop/)
 * Hello,
 * I’m currently working on my exams, and I’m using wordpress to display some of
   my “clients” work.
 * The thing is, I want my image outside the <p> tags the loop creates.
    Like this:
 *     ```
       <div id="prosjekt">
        <img src="myImage.jpg" />
         <div id="info">
          <h2>Title</h2>
          <p>Paragraph</p>
         </div>
       </div>
       ```
   
 * However, when I don’t want a static image, I end up with this:
 *     ```
       <div id="prosjekt">
         <div id="info">
          <h2>Title</h2>
          <p><img src="myImage.jpg" />Paragraph</p>
         </div>
       </div>
       ```
   
 * Is it posible to get the image outside the paragraph tags, if you insert it with
   the post editor?
 * Actual WP-code:
 *     ```
       <div id="prosjekt">
        <div id="info">
         <h2><?php the_title(); ?></h2>
         <?php the_content(); ?>
        </div>
       </div>
       ```
   
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Rbto](https://wordpress.org/support/users/rbto/)
 * (@rbto)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/image-outside-the-loop/#post-1930030)
 * I’m having the same problem.
 *  [Rbto](https://wordpress.org/support/users/rbto/)
 * (@rbto)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/image-outside-the-loop/#post-1930031)
 * Hey, I found this. I haven’t tested it yet. But it seems to solve the problem
   nice. It does a replace on the server side.
 * [http://wordpress.stackexchange.com/questions/7090/stop-wordpress-wrapping-images-in-a-p-tag](http://wordpress.stackexchange.com/questions/7090/stop-wordpress-wrapping-images-in-a-p-tag)
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/image-outside-the-loop/#post-1930032)
 * possible useful plugin:
    [http://wordpress.org/extend/plugins/get-the-image/](http://wordpress.org/extend/plugins/get-the-image/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Image outside the loop’ is closed to new replies.

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [outside](https://wordpress.org/support/topic-tag/outside/)
 * [paragraph](https://wordpress.org/support/topic-tag/paragraph/)
 * [wrapper](https://wordpress.org/support/topic-tag/wrapper/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/image-outside-the-loop/#post-1930032)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
