Site logo

[Resolved] Hide Image Captions

Home Forums Support [Resolved] Hide Image Captions

Home Forums Support Hide Image Captions

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1710525
    Danar Virdaus

    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 🙂

    #1710860
    David
    Staff
    Customer Support

    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.

    #1711280
    Danar Virdaus

    Sure, i include the url on private information.

    #1711291
    David
    Staff
    Customer Support

    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;
    }
    #1711296
    Danar Virdaus

    It works! 🙂

    Thank you very much 🙂

    #1711298
    David
    Staff
    Customer Support

    Glad to hear that!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.