Site logo

Archived topic

Caption is not showing up properly on published posts

8 replies · Started by Anant on March 17, 2023

Viewing posts 1–9 of 9

Hi Team,

Captions set on images show up like normal paragraph instead of an actual caption on published posts.

Here's a snap of it shows: https://imgur.com/2riDHDI

Hi there,

thats a table not an image (?)
Try this CSS:

.wp-block-table .wp-element-caption {
    margin-top: 0.5em;
    margin-bottom: 1em;
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

Hi David,

I missed this response completely. It worked for table.

But actually the issue with caption formatting is with images as well. Here's a snap of image: https://imgur.com/e3PqLBx

Have shared the link to that article in private info.

That isn't a caption, its just a text block below the image.

As that image is a GB Image, select it and in its Toolbar there is a add Caption button. Which a) create the figcaption and b) give you the GB styling controls to resize and position it

Hi David,

I was able to add the caption. Can you help me with the css to style it by reducing its font size and put it in italic.

If you added the caption following David's advice, you should be able to select the caption block and edit it via the options that pop-up on selection and using the block settings (Typography) in the right-hand pane.

You can use the settings controls for that block.
Or if you want to have all figcaptions use the same CSS then add this:

figure figcaption {
    margin-top: 0.5em;
    margin-bottom: 1em;
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

Hi Pete and David,

I followed Pete's advice and its done. Thank you so much.

Thanks Pete.

Glad to hear that

This archived topic is closed to new replies.