Jump to content
Sign in to follow this  
rehansan

Image Captions

Recommended Posts

rehansan    0
rehansan

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.

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

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.

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

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"]aja1.jpg[/caption] [caption id="attachment_532" align="alignleft" width="207" caption="aja test"]aja1.jpg[/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 http://wordpress.org/support/topic/image-caption-shortcode-not-being-parsed, however being new to WP and coding, I do not know if this would be a solution. Let me know, thanks!

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

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"]aja1.jpg[/caption]` `[caption id="attachment_532" align="alignleft" width="207" caption="aja test"]aja1.jpg[/caption]`

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

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

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

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: `aja1.jpg` 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

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

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?

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

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. http://datascaffold.com/wordpress/?p=531 Thanks!

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

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

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

The captions and images are bot set to alignleft. Please take a look at this caption test page I have made. http://datascaffold.com/wordpress/?p=531 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: `aja1.jpg` 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"]Grace-Abbott2.jpg[/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"]Robert-Ball-small1.jpg[/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"]aja1.jpg[/caption]` Please let me know if you can figure out whats going on. Thank you.

Share this post


Link to post
Share on other sites
rehansan    0
rehansan

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×