Archived topic
Disabling all image captions
7 replies · Started by nanche on February 7, 2016
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.
Hi there,
Give this CSS a try:
.wp-caption-text {
display: none;
}
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.
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;
}
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.
Can you link me to a page where it's centering all of that? Widget titles have a completely different class (.widget-title).
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"
I just adjusted the code: https://generatepress.com/forums/topic/disabling-all-image-captions/#post-171191
Give it a try and let me know :)
