December 19, 2012

Add captions to images or video in WordPress

By University of Washington

Image captions

Image captions should be created when uploading an image into your WordPress site. You can also add or update image captions by accessing the Media Library from the left-hand navigation.

Video captions

To add captions to an embedded video, you will need to add the [caption] shortcode around the embedded video. For the caption to appear, you must also have a width attribute set (600 is currently the size of video on our site).

Here is a code snippet your can edit for your site–just replace the caption text and YouTube video ID with your information. You can add the short code using either the Visual or HTML editor in your WordPress CMS.

[caption width="600" caption="ADD YOUR CAPTION HERE"][embed]http://youtu.be/VIDEO_ID[/embed][/caption]

Example

Below is the video caption and YouTube link that has been entered into a page on the Center for Teaching and Learning site:

[caption width="600" caption="Professor Mary Pat Wenderoth describes her 'learning paragraphs' technique to cultivate deep thinking."][embed]http://youtu.be/m1KJBlA3urE[/embed][/caption]

The area in the red box below is how the above code appears on the live site:

Add Video Caption

Comments are closed.