Title: WordPress 3.4 &#8211; Image align problem
Last modified: August 20, 2016

---

# WordPress 3.4 – Image align problem

 *  [boborg](https://wordpress.org/support/users/boborg/)
 * (@boborg)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/)
 * After upgrading to 3.4 images with caption text are no longer aligned. If no 
   caption is included alignment works.
 * How do I resolve this?

Viewing 12 replies - 16 through 27 (of 27 total)

[←](https://wordpress.org/support/topic/wordpress-34-image-align-problem/?output_format=md)
[1](https://wordpress.org/support/topic/wordpress-34-image-align-problem/?output_format=md)
2

 *  Thread Starter [boborg](https://wordpress.org/support/users/boborg/)
 * (@boborg)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814610)
 * Yes thanks. It was indeed some custom captioning code inside my theme functions.
   php
 *  [workhardtravis](https://wordpress.org/support/users/workhardtravis/)
 * (@workhardtravis)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814626)
 * No Problem **🙂**
 *  [HappinessPlunge](https://wordpress.org/support/users/happinessplunge/)
 * (@happinessplunge)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814686)
 * There is extra padding around the image now, causing my layout to break. Any 
   idea how to remove this and still keep the captions?
 *  [Arie Putranto](https://wordpress.org/support/users/arieputranto/)
 * (@arieputranto)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814687)
 * > There is extra padding around the image now, causing my layout to break. Any
   > idea how to remove this and still keep the captions?
 * If you refer to the padding on image with captions, you can filter the ‘img_caption_shortcode’
   to fix this up
 *  [HappinessPlunge](https://wordpress.org/support/users/happinessplunge/)
 * (@happinessplunge)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814688)
 * Hi Arie,
 * Thanks for the note. Can you explain how to use ‘img_caption_shortcode’?
 * For example, this image used to have the same amount of white space on either
   side of the image. Now, due to Thesis + WordPress 3.4, there is more spacing 
   and it doesn’t look centered anymore.
    [http://www.happinessplunge.com/2011/08/photo-friday-%E2%80%93-a-texans-map-of-the-united-states-%E2%80%93-austin-tx-usa/](http://www.happinessplunge.com/2011/08/photo-friday-%E2%80%93-a-texans-map-of-the-united-states-%E2%80%93-austin-tx-usa/)
 * Thanks!
 *  [Aky](https://wordpress.org/support/users/akyjoe/)
 * (@akyjoe)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814731)
 * This is what WordPress 3.4 Codex Says…
 * >  caption text + html[/caption]; that way HTML tags in captions are better supported
   > and the shortcode wouldn’t break when using the wrong quotes
 * I think, all Custom WordPress Themes and Frameworks needs an update to fully 
   support support WP 3.4.
 *  [HappinessPlunge](https://wordpress.org/support/users/happinessplunge/)
 * (@happinessplunge)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814735)
 * Gallardomark, there is a simple solution in the Thesis forums so check it out.
   As for the image padding, I found a simple solution that I shared there too. 
   🙂
 *  [Aky](https://wordpress.org/support/users/akyjoe/)
 * (@akyjoe)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814739)
 * [@gallardomark](https://wordpress.org/support/users/gallardomark/) You can either
   go with [@happinessplunge](https://wordpress.org/support/users/happinessplunge/)
   or may be wait for Next Version of Thesis 1.8.5 to be released next week. To 
   overcome this issue, check out my article [here](http://www.thecreatology.com/image-caption-box-alignment-problem-after-wordpress-3-4-update.html)
 *  [cynthiablue](https://wordpress.org/support/users/cynthiablue/)
 * (@cynthiablue)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814832)
 * I noticed the same problem, just now after I upgraded to WordPress 3.4. I don’t
   really have time to examine themes at the moment, so will have to deal with this
   later. It’s quite annoying to have an alignment problem like this after an upgrade.
 *  [tomivar](https://wordpress.org/support/users/tomivar/)
 * (@tomivar)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814833)
 * This function was causing the problem in our theme.
 * /*
    * Fix the extra 10 pixel width issue for image captions */ add_shortcode(‘
   wp_caption’, ‘fixed_img_caption_shortcode’); add_shortcode(‘caption’, ‘fixed_img_caption_shortcode’);
   function fixed_img_caption_shortcode($attr, $content = null) { // Allow plugins/
   themes to override the default caption template. $output = apply_filters(‘img_caption_shortcode’,”,
   $attr, $content); if ( $output != ” ) return $output; extract(shortcode_atts(
   array( ‘id’=> ”, ‘align’ => ‘alignnone’, ‘width’ => ”, ‘caption’ => ”), $attr));
   if ( 1 > (int) $width || empty($caption) ) return $content; if ( $id ) $id = ‘
   id=”‘ . esc_attr($id) . ‘” ‘; return ‘<div ‘ . $id . ‘class=”wp-caption ‘ . esc_attr(
   $align) . ‘” style=”width: ‘ . ((int) $width) . ‘px”>’ . do_shortcode( $content).‘
   <p class=”wp-caption-text”>’ . $caption . ‘</p></div>’; }
 *  [Erwin](https://wordpress.org/support/users/onstudio/)
 * (@onstudio)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814839)
 * switching over to the snippet by Justin Tadlock did the trick for me > [http://justintadlock.com/archives/2011/07/01/captions-in-wordpress](http://justintadlock.com/archives/2011/07/01/captions-in-wordpress)
 *  [lexistudio](https://wordpress.org/support/users/lexistudio/)
 * (@lexistudio)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814846)
 * Hi, I also had the same problem with my image captions not being aligned under
   the image or in the frame (the frame is lost) after the upgrade to 3.4. I use
   theme Twenty-Eleven, and I haven’t done anything except hit the update button.
   I know nothing about code, so I’m not sure what to do to fix this…
 * My old posts are fine, my new post is not: [http://lexireidstudio.com/2012/06/17/shadow-boxes-and-three-dimensional-collages/](http://lexireidstudio.com/2012/06/17/shadow-boxes-and-three-dimensional-collages/)
 * Any assistance would be greatly appreciated!!

Viewing 12 replies - 16 through 27 (of 27 total)

[←](https://wordpress.org/support/topic/wordpress-34-image-align-problem/?output_format=md)
[1](https://wordpress.org/support/topic/wordpress-34-image-align-problem/?output_format=md)
2

The topic ‘WordPress 3.4 – Image align problem’ is closed to new replies.

## Tags

 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [wordpress 3.4](https://wordpress.org/support/topic-tag/wordpress-3-4/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 27 replies
 * 13 participants
 * Last reply from: [lexistudio](https://wordpress.org/support/users/lexistudio/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/wordpress-34-image-align-problem/page/2/#post-2814846)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
