Site logo

Archived topic

Hide Image Captions

5 replies · Started by Danar Virdaus on March 26, 2021

Viewing posts 1–6 of 6

Hello,

How to hide all image's captions inside posts? I have hundreds of articles and it's hard to hide one by one.
images
I've tried some of the following codes and it doesn't work:

.wp-block-image figcaption {
display: none;
}

.wp-caption .wp-caption-text {
   display: none;
}

.wp-caption-text {
    display: none;
}

Thank You :)

Hi there,

can you share a link to the site where i can see a caption - i can then see what the correct CSS is.

Sure, i include the url on private information.

Try this:

.wp-block-image .aligncenter>figcaption,
.wp-block-image figcaption {
  display: none;
}

As you have a cache that is combining all CSS that may mess with the CSS order and you may need to add !important for it to work:

.wp-block-image .aligncenter>figcaption,
.wp-block-image figcaption {
  display: none !important;
}

It works! :)

Thank you very much :)

Glad to hear that!

This archived topic is closed to new replies.