Shortly after writing an article about Adding Images to WordPress Pages and Posts, I received an inquiry about how to add captions to images. Captions are the small text that appears underneath pictures. They often contain brief descriptions and copyright information. You can add captions to individual images or to multiple images.
Captions for Individual Images
Sometimes you’ll realize that a caption is needed for an image after you’ve written a post or created a page.
- Go to the post or page where you want to add the caption.
- Select the image.
- A small toolbox will appear above the image. Clicking the “x” will delete the image, so don’t do that! You can easily change the alignment right inside that toolbox. Or, you can click on the pencil icon to go to the Attachment Details window, where you can make the same alignment changes as well as adding a caption and modifying size, crop, and link. Advanced Options provide an opportunity to apply title attributes and CSS classes.
- Put your cursor inside the “Caption” field. Type whatever text you want. Put some content in the “Alternative Text” field, in case the viewer can’t see the image. Click “Update“.
- When you upload an image, you have the opportunity to add a caption on a similar screen. Put your cursor inside the “Caption: field and type the text. Click “Insert into post“.
Captions for Multiple Images
You can also write captions when viewing images in the Media Library.
- Go to the Media Library.
- Select the image.
- Your view will be as in step #5 above. Put your cursor inside the “Caption: field and type the text. Instead of clicking “Insert into post”, look at the top right corner of the screen and click the navigational arrows to move forward (>) to the next image or backward (<) to the previous one. When done, click the “X” next to the arrows.
Captions for Images in Galleries
Galleries are created in the Media Library.
- Go to the post or page where you want the gallery.
- Click the “Add Media” button.
- Select “Create Gallery” in the left sidebar.
- Select the images you want in the gallery.
- Captions can be added or edited in the “Caption” field directly underneath the image or in the right sidebar.
Image gallery: captions can be edited in the “Caption” field directly underneath the image or in the right sidebar.
- When finished building the gallery and adding/editing the captions, click “Insert gallery“.
Styling the Captions
The theme’s CSS will determine the overall styling of the captions. You can also add html tags to the captions for some local styling. Some common tags that I use are:
- Italic: <em>Title of Art</em> by Artist Name
- Bold: Click the <strong>Add Media</strong> button.
Strike Through: If you want to show an edited word of text, use <strike>Strike Through</strike>.- To force a line break: <br>
Related Posts
Adding Images to WordPress Pages and Posts
Adding Images to a WordPress Sidebar
How to Resize an Image in WordPress
How to Resize an Image in Photoshop
How to Create and Edit WordPress Galleries
Good blog post. I definitely appreciate this site. Thanks!