Remove thumbnail
-
Hi!
I want to remove a thumbnail in the post ONLY. But, when I use this code
img.attachment-thumbnail,
img.size-thumbnail,
.wp-caption img {display:none;}It’s remove thumbnails ALL! (Home page, category and post etc) I need to remove a thumbnail in the post only. How I can to do it? Help me, please.
ModDo mean a thumbnail that is in the post content? Or a thumbnail that is somewhere else on the page?
If you mean a thumbnail that is in the post content, all you need to do is edit the picture and select the size that you want it to appear, or delete the picture altogether.
If you mean thumbnails somewhere else on the page, then use this:
.single img.attachment-thumbnail,
.single img.size-thumbnail,
.single .wp-caption img {display:none;}The WP CSS class
.single
denotes a single post or page.If you want to delete it on only a certain post, you will need to use the post ID.
I’m not sure what you originally meant, so if this doesn’t do what you need to do, please be more specific and include a link.
Moved to Support. Please post in the correct section next time. BTW, the backtick (
Code:`) character is usually located above the Tab key on your keyboard. I’ve fixed this in your post.
ModThis is not the best way to achieve what you are trying to achieve, but this code should work:
.single .size-thumbnail {
display: none;
}You really should use the featured image option to get images on archive pages but not on posts.
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.