Jump to content
Sign in to follow this  
revoltoid

Image caption doesn't work with Bootstrap

Recommended Posts

revoltoid    1
revoltoid

Hello, I tried to use the new WP 3.4 image caption feature but experienced a little difficulty with Bootstrap codes. I have a page with an image inserted the Bootstrap way:

Title

documentary wedding photography edinburgh-test
Now if I try to add a caption, it doesn't get saved, no lines appear on the html tab in the editor, nothing is displayed. I edit the image, update, then update the page itself, but when I return to the image, the caption field is empty . Also have another page that is plain editor-formatted and the caption works, it inserts this lines on the html tab: [caption id="attachment_217" align="alignright" width="490"]documentary wedding photography canongate kirk caption test[/caption] So, what am I missing? Thanks!

Share this post


Link to post
Share on other sites
beardedavenger    158
beardedavenger
Hey THere, The caption is from Wordpress, not Bootstrap. In your first example, your're missing the wp-caption shortcode. So, wrap your in side a caption shortcode. Nick

Something big is coming for DMS + photographers.

http://fotostheme.com

 

Nick Haskins & CO - New home for all of my PageLines Store products! 

http://nickhaskins.co

 

Better DMS - News, Tutorials, and Tips

http://betterdms.com

 

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Hello Nick, thanks. I know that the caption is a wordpress thing. My problem is exactly the caption shortcode. Why is that when I create a caption for am image by editing it via the visual tab in the editor it inserts the code when I update/save the options, but it doesnt when the photo is inserted by bootstrap codes? Do I have to manually insert the caption shortcode every time I use bootstrap codes?

Share this post


Link to post
Share on other sites
Rob    547
Rob
Second example you don't close the img tag with before [/caption]

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Not sure what you mean rangelone. The second example does work. It is the first one that doesnt. My main problem is: when I try to add a caption for an image inserted into a post while editing a page on the visual tab in the editor, the caption is not saved when I update the image. The caption field is empty again after saving. Parallelly, it does not insert the codes for the caption on the html tab either. This only happens if the image was inserted into the post text by Bootstrap codes. It does work when the post was edited the normal way using the 'add media' button when embedding the image.

Share this post


Link to post
Share on other sites
Simon    247
Simon
You cant switch between visual and html editor, use one or the other.

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Thanks Simon, Well, that is new to me, I have been editing posts by switching html and visual tab and used whatever was suitable for certain tasks. Is it not how everyone uses the editor? Are you saying that if I intend to use any shortcodes (plugin shortcodes for example) I can only use the html tab on the editor and cant touch the visual tab to edit the post? As I can't insert a shortcode on the visual tab.

Share this post


Link to post
Share on other sites
Simon    247
Simon
Sorry, why did you reject my answer? Use the visual editor to create your post, add the image etc, then switch to html mode to add your custom stuff, then save.

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Sorry Simon, But I have never actually rejected any answers in the past until I have read that this is what I should do till I don't consider my problem solved, am I wrong? I wouldn't use this feature myself, I only used it to obey the forum rules, so you have quite surprised me with your question. I may have misunderstood something? "Clicking "reject" on an answer tells the moderators that the answer provided did not solve your problem and you still need help." Back to the subject, "Use the visual editor to create your post, add the image etc, then switch to html mode to add your custom stuff, then save." So how do I create my post if want to make a good use of the Bootstrap column grid? I can not start with the visual editor, can I? Can we concentrate on my original question please, which was whether I can add a caption via the visual editor if the image itself is inserted in Bootstrap codes on the HTML tab?

Share this post


Link to post
Share on other sites
Simon    247
Simon
Heres how i created the post with the html editor http://screencast.com/t/AfVkc2RV

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Thank you Simon for that presentation, its great! Now, you inserted the image BEFORE adding the Bootstrap codes. My problem is adding it afterwards. Lets say, you plan the layout/grid of the page/post, you write your text, and publish the page without the photos. Then you decide/find which photo you would like to add, or maybe you would like to replace the existing one with a better one. You delete the image and insert the new one. Now, your caption will not be saved and will not work. Wordpress is not inserting the necessary caption codes into the Bootstrap codes.

Share this post


Link to post
Share on other sites
Simon    247
Simon
Is this what you are trying to do? http://screencast.com/t/yMNbNHeinO

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
Thanks again for the video. Yes, that is it, with a slight difference. When I insert the image the very first time, I don't give it a caption (lets say I don't know the person's name who is on the photo), but I want to go ahead with publishing the post and collect details later. So the image is now inserted without any captions. Later I find out what exactly I want as a capture so I go to the editor, hit the visual tab, click on the photo, then hit the edit image button on the top left of it to start editing/updating. I enter something in the caption field and update/save it. Now the caption did not get saved, the field is empty again when I open the edit image window.

Share this post


Link to post
Share on other sites
Jenny    33
Jenny
The entire caption process is Wordpress-related and not a feature or setting of PageLines at all. Have you posted over on the [url="http://wordpress.org/support/"]Wordpress forums[/url] about this?

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
revoltoid    1
revoltoid
The reason I haven't was that I noticed this happens only when bootstrap codes are involved, and bootstrap comes with my framework and not wordpress. It seems I should try the wp forums as well, thanks.

Share this post


Link to post
Share on other sites
catrina    103
catrina
Let us know what the people on WP forums say in case they might have any insight.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

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  

×