[resolved] Captions not working properly (6 posts)

  1. samanime
    Posted 6 years ago #


    On my website, HTML Blox, the captions don't show up properly. If you see http://www.htmlblox.com/lessons/html-lessons/lesson-33-lay-it-out-tables/ you will see the problem I am facing. The images are showing up properly, but it looks like the caption code isn't being processed.

    I've upgraded to the latest version of WordPress and tried re-adding the caption and it still results the same.

    Thank you.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Are you using any plugins which might break the caption shortcode? Try disabling your plugins, see if that makes it work.

  3. samanime
    Posted 6 years ago #

    Good idea, but no go. I deleted any deactivated plugins (not really for this, just housekeeping) then deactivated all active plugins and nothing changed for the caption.

  4. kmessinger
    Posted 6 years ago #

    Your code is very different from mine as far as a picture and a caption go.

    [caption id="attachment_79" align="aligncenter" width="201" caption="Image 3.3.1: An table diagram."]<img class="size-full wp-image-79" title="html33table" src="http://www.htmlblox.com/wp-content/uploads/2008/08/html32table.png" alt="Image 3.3.1: An table diagram." width="201" height="201" />[/caption]

    <div id="attachment_1351" class="wp-caption alignleft" style="width: 161px"><img class="size-full wp-image-1351" title="candparkguide" src="http://www.ourexcellentadventures.com/wp-content/uploads/2009/02/candparkguide.jpg" alt="This one looks good!" width="151" height="220" /><p class="wp-caption-text">This one looks good!</div>

    Mine is on the bottom.

  5. samanime
    Posted 6 years ago #

    Yes, if I'm not mistaken when I post an article that [caption] gets converted to what you posted at the bottom. These captions used to work as well, and I believe the code looked very similar to what you posted.

    I didn't make any changes or anything either. I just noticed one day that they were broken.

    I may have to just change what quote the Add Media link adds to my file, though that would be a bother.

  6. samanime
    Posted 6 years ago #

    Ah, I fixed it. I forgot that I began to work on a plugin that would replace terms with terms in a glossary I had set up. I did a sort of hard-coded plugin just for testing and was echoing "get_the_content()" instead of using the_content().

    I guess within the_content() it must do the processing to convert [caption] to <div class="wp-caption">.

    Thanks for the help everyone.

Topic Closed

This topic has been closed to new replies.

About this Topic