[Resolved] Disabling all image captions

Home Forums Support [Resolved] Disabling all image captions

Home Forums Support Disabling all image captions

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #171107
    nanche

    Hello,
    Is it possible to somehow disable image captions for all posts on my site? I need to disable/enable them sometimes and it takes very long to do it manually everytime for 50+ posts.

    #171126
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this CSS a try:

    .wp-caption-text {
        display: none;
    }
    • This reply was modified 8 years, 2 months ago by Tom.
    #171158
    nanche

    I just tried that but it completely removed all images that has a caption, I would want the image to still show just without any captions if that is possible.

    Also, is there any way to center all post titles and only post titles? I tried adding “text-aling: center” to entry-title like this:

    .entry-title {
    	margin-bottom: 0;
    	text-align: center;
    }

    But it centered all titles on my front page and sidebar widget as well.

    #171191
    Tom
    Lead Developer
    Lead Developer

    Ah sorry about that – I adjusted the code above: https://generatepress.com/forums/topic/disabling-all-image-captions/#post-171126

    Try this:

    .blog .entry-header .entry-title,
    .archive .entry-header .entry-title,
    .single .entry-header .entry-title {
        text-align: center;
    }
    • This reply was modified 8 years, 2 months ago by Tom.
    #171338
    nanche

    The caption code worked perfectly! I tried the new code you sent to center post titles but it still also centers all front page titles and widget titles.

    #171392
    Tom
    Lead Developer
    Lead Developer

    Can you link me to a page where it’s centering all of that? Widget titles have a completely different class (.widget-title).

    #171419
    nanche

    Site: https://bestseekers.com

    I have disabled the code currently but from what I can see post title, the popular/recent plugin I’m using and the homepage titles all use “entry-title”

    • This reply was modified 8 years, 2 months ago by nanche.
    #171459
    Tom
    Lead Developer
    Lead Developer

    I just adjusted the code: https://generatepress.com/forums/topic/disabling-all-image-captions/#post-171191

    Give it a try and let me know 🙂

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