Title: Code Edit Changing Code
Last modified: August 18, 2016

---

# Code Edit Changing Code

 *  [aeonex](https://wordpress.org/support/users/aeonex/)
 * (@aeonex)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/code-edit-changing-code/)
 * This is a repost and for that I apologize. It’s not a huge issue, but I was just
   seeing if anyone here could figure out an alternative to my solution. When I 
   insert the following code into a page (visual editor disabled):
 *     ```
       /* Correct code snippet
       ---------------------------*/
       <div id="contactright">
       <img alt="image.jpg" src="image.jpg" height="133" width="200">
   
       <b>T:</b> Phone Number
   
       <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
   
       <b>T:</b> Phone Number
       ```
   
 * It adds an additional random <p> to my img tag when I create the page.
 * It will do something like this :
 *     ```
       /* incorrect code snippet
       ---------------------------*/
       <div id="contactright">
       <img alt="image.jpg" src="image.jpg" height="133" width="200">
   
       <b>T:</b> Phone Number
   
       <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
   
       <b>T:</b> Phone Number
       ```
   
 * I can get it to work by putting the code like :
 *     ```
       /* alternative code snippet
       ---------------------------*/
       <div id="contactright">
       <img alt="image.jpg" src="image.jpg" height="133" width="200">
       <p>
       <b>T:</b> Phone Number
       </p>
       <div id="blank">
       <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
       <p>
       <b>T:</b> Phone Number
       </p>
       ```
   
 * but that looks sloppy :/. I’m Trying to see if there is another way to fixing
   this other than tricking it by putting a <div id=”blank”> before image2 starts.
   It looks like word press wants a <p> to start after a </p> unless the <p> is 
   followed by a <div> or another value.

Viewing 1 replies (of 1 total)

 *  Thread Starter [aeonex](https://wordpress.org/support/users/aeonex/)
 * (@aeonex)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/code-edit-changing-code/#post-656131)
 * Incorrect code snippet isn’t actually showing the problem. That entire post was
   typed wrong :/ .
 * Since I can’t edit the thread starter the code snippets need to be changed to:
 *     ```
       /* input
       ---------------------------*/
       <div id="contactright">
       <img alt="image.jpg" src="image.jpg" height="133" width="200">
       <p>
       <b>T:</b> Phone Number
       </p>
       <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
       <p>
       <b>T:</b> Phone Number
       </p>
       ```
   
 *     ```
       /* output
       ---------------------------*/
       <div id="contactright">
       <img alt="image.jpg" src="image.jpg" height="133" width="200">
       <p>
       <b>T:</b> Phone Number
       </p>
       <p>
       <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
       </p>
       <p>
       <b>T:</b> Phone Number
       </p>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Code Edit Changing Code’ is closed to new replies.

## Tags

 * [formatting](https://wordpress.org/support/topic-tag/formatting/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [aeonex](https://wordpress.org/support/users/aeonex/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/code-edit-changing-code/#post-656131)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
