Title: WordPress gallery caption editing
Last modified: July 19, 2024

---

# WordPress gallery caption editing

 *  Resolved [porubs1](https://wordpress.org/support/users/porubs1/)
 * (@porubs1)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/)
 * I would like to increase the size of the font for the captions in one gallery,
   this particular test gallery, but have the option to do this for any gallery.
   I don’t want it to be global, so I’m thinking I could use custom CSS, for the
   block but don’t know how to do this. Can anyone help or make a suggestion to 
   edit? Thanks in advance to all.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-gallery-caption-editing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Justin Tadlock](https://wordpress.org/support/users/greenshady/)
 * (@greenshady)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/#post-17901106)
 * I would recommend making a block style variation that applies your custom caption
   styles: [https://developer.wordpress.org/themes/features/block-style-variations/](https://developer.wordpress.org/themes/features/block-style-variations/)
 * Then, apply that variation to this specific Gallery block (and any others you
   might want to use it for later).
 *  Thread Starter [porubs1](https://wordpress.org/support/users/porubs1/)
 * (@porubs1)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/#post-17902570)
 * Yeh, I don’t know how to do this, and would rather a CSS edit I could add to 
   Customizer.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/#post-17902823)
 * If you prefer OG ways, you can use a page’s unique body class attribute such 
   as `page-id-7140` to apply custom caption CSS only to that specific page. For
   example:
 *     ```
       .page-id-7140 .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
           font-size: 16px;
       }
       ```
   
 *  Thread Starter [porubs1](https://wordpress.org/support/users/porubs1/)
 * (@porubs1)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/#post-17902977)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/) – THAT IS EXACTLY WHAT
   I WANTED TO DO!!!!! Thank you very much!

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

The topic ‘WordPress gallery caption editing’ is closed to new replies.

## Tags

 * [captions](https://wordpress.org/support/topic-tag/captions/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 3 participants
 * Last reply from: [porubs1](https://wordpress.org/support/users/porubs1/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-gallery-caption-editing/#post-17902977)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
