WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 3.4 - Image align problem (28 posts)

  1. boborg
    Member
    Posted 1 year ago #

    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?

  2. boborg
    Member
    Posted 1 year ago #

    It is only happening to new posts and not older existing posts until I edit and update them. Then alignment is lost.

  3. kabitzin
    Member
    Posted 1 year ago #

    I have the same issue at seaslugteam.com

    You can see the top posts posted with WP 3.4 do not have the same formatting as the posts prior to 3.4

    I suspect it might be theme-related because if I switch to the default WP theme, the captions work correctly. Is there some fix that can be made to themes to render these new captions correcly?

  4. theupcoming.co.uk
    Member
    Posted 1 year ago #

    Same here, this is a big problem for our magazine. How can we fix it?

  5. A link may help, without without information it's difficult to identify what's going on.

    In the meanwhile:

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.

    Also consider giving this a good read too.

    http://wordpress.org/support/topic/troubleshooting-wordpress-34-master-list?replies=4

  6. theupcoming.co.uk
    Member
    Posted 1 year ago #

    I was comparing the codes of a previous post and a new one, basically it doesn't add any more this bit:

    <dl id="attachment_31587" class="wp-caption alignright" style="width: 310px;">
    <dt class="wp-caption-dt">

  7. kabitzin
    Member
    Posted 1 year ago #

    A link may help, without without information it's difficult to identify what's going on.

    seaslugteam.com as mentioned above

    deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    no effect

    switching to the Twenty Eleven theme to rule out any theme-specific problems.

    the issue resolves itself in the newest version of Twenty Eleven. Captions also display correctly within the visual editor itself. However, switching back to Thesis the caption problem is still there. I suspect it is a theme-related problem combined with the new updates to image captions allowing HTML.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    no effect

    re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.

    no effect

  8. Thanks for the link, but I was referring to the OP boborg.

    It's his thread you've both hijacked with your problem and frankly that's considered rude. Please start your own thread instead, you're both being impolite to boborg.

    Ask yourself, how would you feel if someone walked into your conversation while you had a problem and took over?

    Moving along then.

    @kabitzin and

    switching to the Twenty Eleven theme to rule out any theme-specific problems.

    That indicates that it's your theme that's causing the problem. Looking at your source, you're running Thesis 1.8.4 with custom CSS.

    Since you can customize the CSS, try using Firebug to identify the CSS and figure out how to adjust it.

    @theupcoming.co.uk, the same applies.

  9. kabitzin
    Member
    Posted 1 year ago #

    It's his thread you've both hijacked with your problem and frankly that's considered rude. Please start your own thread instead, you're both being impolite to boborg.

    But it's the same problem...

    Furthermore, does this indicate that only the OP and people with the solution are allowed to participate in the thread discussion? I am just trying to add that I also experienced the same problem and I have listed what did and did not work in my case. Also, I have noticed that when no one else chimes in that they have also had the same problem, the problem gets swept under the rug as being "just your settings".

    Back on topic, I have been posting about this problem in the Thesis support forum and other users of the theme have indicated having the same image caption problem. I don't think it is only the Thesis theme, but there is something about WP 3.4 captions that not all themes might support yet. The same HTML-stripping issue that theupcoming.co.uk reports seems to be the cause.

  10. boborg
    Member
    Posted 1 year ago #

    For the record I have no problem with the follow up posts. In fact it is good to know that I am not the only one.

    I have contacted Solostream which has made the Theme I am using so I will wait for them to respond.

  11. Thanks boborg. ;)

    Furthermore, does this indicate that only the OP and people with the solution are allowed to participate in the thread discussion?

    Not at all, if you can contribute to solving the OP's issue.

    The conversation got derailed and we never got details from boborg other than he's got image alignment problems. So how did you know what boborg's exact issue was?

    I'm not coming down hard on you, but as I said, put yourself in the other person's shoes. I was looking for input from the OP. There wasn't enough information.

    Thankfully he replied, so "No fault, No foul".

    Now moving along and talking about your specifics: I think it's your theme or your CSS customizations. I'm not CSS savvy enough to recommend any changes but perhaps someone can recommend a fix?

    Take a look at the For Developers portion of the master list. That portion may indicate what's going on.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    But it's the same problem...

    If you knew what the problem was, you wouldn't be here. Secondly, when a forum moderator asks you to start your own topic, don't argue. Just do it. We know what works best in these forums and separate topics - even for superficially similar problems - is the most effective approach here. Otherwise, if threads become unmanageable (as this one is becoming) we have no alternative but to shut them down - which doesn't help anyone.

    Bottom line: Please help us to help you..

  13. theupcoming.co.uk
    Member
    Posted 1 year ago #

    I agree with kabitzin and boborg, it is much better when several people share the same symptoms, it shows it doesn't depend on your specific set-up only. The more information, the better for us!

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Then you may find that the forum mods and regulars will abandon the topic as it becomes too unwieldy to follow or provide support. Or the topic will be closed. We have tried it your way. It doesn't work well and what makes it worse is that people then complain that they're not getting answers.

    good luck :-)

  15. workhardtravis
    Member
    Posted 1 year ago #

    I just took on this job as a freelance project and solved it:

    ****NOTE: make a backup of your functions.php file before deleting anything and make sure you have FTP access just in case****

    If you are using a shortcode for your captions: delete this section of code in your functions.php file..

    From : function fb_img_caption_shortcode($attr, $content = null) {

    To: add_shortcode('caption', 'fb_img_caption_shortcode');

    Save and update.

    That worked for me.

  16. kabitzin
    Member
    Posted 1 year ago #

    Ok, I have moved it to its own topic, and referenced the fix that the Thesis theme creators provided. Basically there was a shortcode conflict that can be resolved in the custom functions php file.

    This might be something to consider, boborg and theupcoming.co.uk if your theme overwrites the default wp caption shortcodes.

    http://wordpress.org/support/topic/wp-34-breaks-captions

  17. boborg
    Member
    Posted 1 year ago #

    Yes thanks. It was indeed some custom captioning code inside my theme functions.php

  18. workhardtravis
    Member
    Posted 1 year ago #

    No Problem :)

  19. HappinessPlunge
    Member
    Posted 1 year ago #

    There is extra padding around the image now, causing my layout to break. Any idea how to remove this and still keep the captions?

  20. Arie Putranto
    Member
    Posted 1 year ago #

    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

  21. HappinessPlunge
    Member
    Posted 1 year ago #

    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/

    Thanks!

  22. Aky Joe
    Member
    Posted 1 year ago #

    This is what WordPress 3.4 Codex Says...

    Change the image caption shortcode format to [caption ...]<img /> 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.

  23. HappinessPlunge
    Member
    Posted 1 year ago #

    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. :)

  24. Aky Joe
    Member
    Posted 1 year ago #

    @Gallardomark You can either go with @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

  25. cynthiablue
    Member
    Posted 1 year ago #

    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.

  26. tomivar
    Member
    Posted 1 year ago #

    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>';
    }

  27. Erwin
    Member
    Posted 1 year ago #

    switching over to the snippet by Justin Tadlock did the trick for me > http://justintadlock.com/archives/2011/07/01/captions-in-wordpress

  28. lexistudio
    Member
    Posted 1 year ago #

    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/

    Any assistance would be greatly appreciated!!

Topic Closed

This topic has been closed to new replies.

About this Topic