Jump to content


Photo
- - - - -

Image Captions


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 12 January 2011 - 04:23 PM

I am having some problems adding captions to images. On the edit post/page, everything looks great, the image and caption are displayed and the text is correctly wrapped around the image. However when I publish the post and view it, the caption is not displayed and the image is floating with no text wrap. If I delete the caption, everything lines back up correctly. I read the other post on captions where you said it was a wordpress problem, but I don't seem to be having this issue on other blogs. I have tried this with multiple posts/pages/images and its all the same. Please let me know how to resolve this. Thanks.

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 12 January 2011 - 06:40 PM

I have a thought...try creating a caption using both the visual and html editor and see if there is a difference. I have a hunch.

#3 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 12 January 2011 - 08:09 PM

There is a slight difference, as you can see below between the short code generated by the visual and html editors respectively:
[caption id="attachment_532" align="alignleft" width="207" caption="aja test"]

Please Login or Register to see this Hidden Content

[/caption]

[caption id="attachment_532" align="alignleft" width="207" caption="aja test"]

Please Login or Register to see this Hidden Content

[/caption]

Both of them show up in the visual editor, but when you view the post, there is no caption, and no text wrapping.

When I insert an image alone without a caption, everything works great. But as soon as a caption is added through the visual or HTML all of the wrapping disappears and no caption shows up.

I've been looking around and found this

Please Login or Register to see this Hidden Content

, however being new to WP and coding, I do not know if this would be a solution. Let me know, thanks!

#4 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 12 January 2011 - 08:11 PM

whoops that didnt work, proving I'm new to this... with the added backticks... `[caption id="attachment_532" align="alignleft" width="207" caption="aja test"]

Please Login or Register to see this Hidden Content

[/caption]` `[caption id="attachment_532" align="alignleft" width="207" caption="aja test"]

Please Login or Register to see this Hidden Content

[/caption]`

#5 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 13 January 2011 - 01:56 AM

Hmm, that might be a problem right there, why are you using shortcodes instead of the traditional WordPress image embed? Thanks, Bryan

#6 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 13 January 2011 - 02:58 PM

I'm pretty sure I am using the traditional WP image embed... I upload/insert picture and it generates this code in the post which works fine: `

Please Login or Register to see this Hidden Content

` However when I add a caption, it changes the code to one of the shortcodes that I mentioned previously. Using the WP media manager to add captions and format would be a lot easier for me than coding for each image on the site, but if this just isn't possible is there a work around? Thanks

#7 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 13 January 2011 - 08:15 PM

It shouldn't be a problem with the theme parsing shortcodes because I've done captions myself with PlatformPro, however, do you have a live link so we can look for potential conflicts of css or something like that?

#8 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 13 January 2011 - 08:59 PM

The site is obviously still under construction, but I built a test post with examples of an image with no caption, caption via visual editor and caption via html editor. Let me know if this sheds light on anything.

Please Login or Register to see this Hidden Content



Thanks!

#9 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 14 January 2011 - 03:24 AM

Adding a caption is fine, you just need to make sure to set it aligned left as well. Thanks, Bryan

#10 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 18 January 2011 - 07:04 PM

The captions and images are bot set to alignleft. Please take a look at this caption test page I have made.

Please Login or Register to see this Hidden Content



The first image is a picture uploaded and inserted into the post via the WP content editor and it produced the following code which correctly displays the image with the text wrapped:
`

Please Login or Register to see this Hidden Content

`

The next image is uploaded with a caption via the visual editor, but as you can see the caption is not displayed, nor is there any formatting:
`[caption id="attachment_757" align="alignleft" width="408" caption="this is a caption"]

Please Login or Register to see this Hidden Content

[/caption]`

The third image is uploaded while in the html view of the editor with a caption, but no caption and no formatting:
`[caption id="attachment_755" align="alignleft" width="252" caption="this is a caption"]

Please Login or Register to see this Hidden Content

[/caption]`

The final image and caption were added via the html editor, and I changed the above code from ..class="size-full... to ..class=alignleft size-full... and as you can see the image aligned, but there is still no caption:
`[caption id="attachment_532" align="alignleft" width="207" caption="This is a caption"]

Please Login or Register to see this Hidden Content

[/caption]`

Please let me know if you can figure out whats going on.

Thank you.

#11 rehansan

rehansan

    Newbie

  • Members
  • 7 posts

Posted 18 January 2011 - 09:18 PM

Hey guys, we ended up reinstalling WP on the server and everything seems to be working fine. I guess we were missing a file or some permissions or something. Thanks for the help though.

#12 dsharpe

dsharpe

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 26 January 2011 - 04:19 PM

I am having trouble with my captions as well.

Please Login or Register to see this Hidden Content

I would like captions and boxes like this, and figured purchasing Platform Pro it would come as part of the theme:

Please Login or Register to see this Hidden Content