Image captions within my theme
-
Is there a way to center the captions under the images and also have the captions use the small fant?
WP.com: Yes
Jetpack: No
Correct account: YesThe blog I need help with is: (visible only to logged in users)
-
-
Hi! In the editor it looks like your theme should be centering image captions; are you finding that they’re not centered in the published view of your posts?
With regards to the font, it could be worth trying the sub- or super-script options which are available in the right-most arrow button of your caption toolbar (seen here: https://wordpress.com/support/wordpress-editor/blocks/image-block/#captions ).
-
I use the image toolbar to centre the captions under the images on my blog. Click on the Align Text button and select ‘Align text centre.’
-
the captions are not centered when published. I am including mobile screenshots because I am away from my desktop atm



-
Thanks for confirming.
The issue here seems to be that the theme you are using (Lovecraft) is an older one that pre-dates our block editor. It does have basic compatibility but in some cases is not able to understand all block settings. In this case the left-aligned captions are hard-coded into the theme, and cannot be overridden by the settings in the block.
Because you are upgraded to our Premium plan, you have the ability to do this by adding CSS code in your site customizer. Just click on the CSS tab and paste in the following code:
.wp-block-image .aligncenter>figcaption { text-align: center; }Hope that helps. Please let us know if you have any more questions.
-
Thank you for sharing this, worked like a charm. What about removing the small border that appears around the images, even when the image is white but still shows a border? Attaching examples:


-
Hi there!
The following CSS can be added to My Site → Appearance → Additional CSS to completely remove that border added to your images:
.entry-content img { border: none; }Let me know if you have any questions!
-
- The topic ‘Image captions within my theme’ is closed to new replies.