Title: Adding classes to image captions
Last modified: August 21, 2016

---

# Adding classes to image captions

 *  [James Wade](https://wordpress.org/support/users/jpswade/)
 * (@jpswade)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/)
 * Before I go ahead and put in a feature request, I thought I’d ask.
 * Is there an easy way, using the interface that you can add classes to the actual
   image caption?
 * In the “Advanced Settings” there’s the option to add classes to the image or 
   link, but not the caption itself, which strikes me as unusual.
 * Am I overlooking something or does this actually not exist?
 * Of course I am aware that you can edit it manually in the “text” tab, but this
   is a bit too confusing for some users.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120194)
 * Captions already come with their own class, i think it is `.caption` but don’t
   quote me 🙂
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120200)
 * I’m pretty sure (I haven’t looked either to double check) that it’s `.wp-caption`
   and `.wp-caption-text`.
 * If you want to play with the styling and/or options give this topic a read.
 * [http://wordpress.org/support/topic/css-styling-photos-and-captions-problem?replies=16](http://wordpress.org/support/topic/css-styling-photos-and-captions-problem?replies=16)
 * It may help you out.
 *  [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120203)
 * [http://digwp.com/2010/05/default-wordpress-css-styles-hooks/#wysiwyg](http://digwp.com/2010/05/default-wordpress-css-styles-hooks/#wysiwyg)
 *  Thread Starter [James Wade](https://wordpress.org/support/users/jpswade/)
 * (@jpswade)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120213)
 * Perhaps I wasn’t clear. Users want to add custom classes on a per caption basis.
 * Here’s an example:
 * One caption may be green, so the class to be added will be .caption-green, or
   red, so .caption-red, etc.
 *  Thread Starter [James Wade](https://wordpress.org/support/users/jpswade/)
 * (@jpswade)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120262)
 * [http://core.trac.wordpress.org/ticket/25295#ticket](http://core.trac.wordpress.org/ticket/25295#ticket)
 *  [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120264)
 * Why does this need to be in the core? Why not a plugin?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120269)
 * There is a certain logic to it given that you can add classes to images. But 
   I really don’t see why this can’t be handed using pure CSS without any new classes.
   Eg:
 *     ```
       #attachment_1628 .wp-caption-text {
       color:red;
       }
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Adding classes to image captions’ is closed to new replies.

## Tags

 * [advanced](https://wordpress.org/support/topic-tag/advanced/)
 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [classes](https://wordpress.org/support/topic-tag/classes/)
 * [feature](https://wordpress.org/support/topic-tag/feature/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 4 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/adding-classes-to-image-captions/#post-4120269)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
