Prevent featured images from displaying at the top of posts?
-
How can I prevent the featured images from displaying at the top of posts? I am using the featured images for another purpose — to display as thumbnails on category lists to assist with navigation, but I don’t like them showing up at the beginning of the posts. I have the custom design upgrade.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
I see that Richard was helping you with this recently here:
https://en.forums.wordpress.com/topic/prevent-featured-images-from-displaying-at-the-tops-of-posts
Is that the change you’re trying to make, or are you going for something different?
-
Yes, you are right, rachelmcr. I forgot to clarify. Richard’s solution works perfectly for the single post page. And I thought I wouldn’t mind the featured image showing up on my main page, but it does bother me. Is there a way to prevent the featured image from displaying on the main page as well? Thanks!
-
Ah, I understand now. Thanks for the clarification! You can indeed remove the featured image from the main page, as well.
The code Richard gave you uses the .single class selector to remove featured images from the single post pages:
.single .entry-thumbnail { display: none; }You can make that code apply to featured images everywhere by removing “.single” from the code, to get this:
.entry-thumbnail { display: none; }Another option is to leave the code that Richard gave you and add this code, which uses the .blog class selector to remove featured images specifically from your main blog page:
.blog .entry-thumbnail { display: none; }Please let me know if you have any questions about that. :)
-
Thank you, Rachel. I’ll apply that when I get home from work today :). I want you to know how much I appreciate the bit of CSS education you included as well. It’s all new to me, but I’m starting to have a framework to fit those pieces of info into. Thanks, and enjoy your day!
-
You’re very welcome! If you’re interested in learning more, we also have tips for getting started with CSS here:
Just let me know if you have any questions about that, and once you get a chance to apply that new CSS let me know how it goes for you. :)
-
Ahh! Beautiful! (Ok, I admit I gave it a quick try before getting home from work.) I used your second option…
.blog .entry-thumbnail {
display: none;
}…as I still wanted the featured images to be utilized in other ways and didn’t know how that code might affect those.
Thanks for the resource links as well; those look great.
-
- The topic ‘Prevent featured images from displaying at the top of posts?’ is closed to new replies.