Title: Image Caption Coding
Last modified: August 19, 2016

---

# Image Caption Coding

 *  [BJ05](https://wordpress.org/support/users/bj05/)
 * (@bj05)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/image-caption-coding/)
 * I am overall pleased with WP2.6 but have a nagging issue with image captioning.
 * How the hell do you make it work?
 * When I use the uploader, position the image, usually left, the code produced 
   is this
 * `[caption id="attachment_1568" align="alignleft" width="300" caption="Truck radiation
   monitor"]<a href="http://mexicotrucker.com/wp-content/uploads/2008/07/truckradiationportalmonitor.
   jpg"><img src="http://mexicotrucker.com/wp-content/uploads/2008/07/truckradiationportalmonitor.
   jpg" alt="Truck radiation monitor" title="truckradiationportalmonitor" width="
   300" height="282" class="size-medium wp-image-1568" /></a>[/caption]`
 * The [caption] is the part that is out of place and after the post is published,
   that shows as port of the text of the post.
 * My temporary solution has been to manually delete the portions in bold and insert
   the alignment at the end.
 * Is there a correction for this or what? Would appreciate a solution if there 
   is one.

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

 *  [marklaflamme](https://wordpress.org/support/users/marklaflamme/)
 * (@marklaflamme)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/image-caption-coding/#post-812718)
 * I wish I could see which sections you deleted (the bold text doesn’t show up 
   on my end) because I’m having the same problem and no amount of tweaking will
   fix it. I’ve added the caption code to my theme style.css and all the other suggested
   fixes and nothing. Driving me crazy. If you find your way out of this caption
   hell, I’d love to hear how you did it.
 *  [kirko](https://wordpress.org/support/users/kirko/)
 * (@kirko)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/image-caption-coding/#post-812936)
 * I lose the formatting of the image as well and it just sits to the left of the
   page with text that should float around it just sitting underneath so it is not
   being styled at all.
 * I think, in my case, it seemed to occur after an uploaded image was manually 
   deleted via the html editor for a particlaur post and once that image has gone
   subsequent uploaded images (in any post) cannot access the CSS style.
 * I would like to understand how the default CSS style is applied. Is it a sequencing
   problem caused by the way the image was manually deleted from inside the post?
 * How is the number generated (as above “attachment_1568”) and where is the code
   that generates it ?
 * Why won’t it default to the style I have set in my theme’s CSS when I manually
   change the code to delete all reference to the automatically generated style ?
 * And, most frustratingly, whilst I am in the editor (visual mode now) the image
   and caption are formatted perfectly. Once I publish or save though, the formatting
   is lost when the post is displayed on my site.

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

The topic ‘Image Caption Coding’ is closed to new replies.

## Tags

 * [captions](https://wordpress.org/support/topic-tag/captions/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [kirko](https://wordpress.org/support/users/kirko/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/image-caption-coding/#post-812936)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
