- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello, I would like to know what CSS code to add to hide featured images from showing up on blog posts.
I am aware of a WP plugin but it does not work with the theme I am using.
Here is an example blog post where you will notice that two images are showing up on top, the first one is from the featured images setting, the other is directly in the blog post.
http://algarveportugal.co.uk/visit-loule-in-algarve-portugal/
I know this may seem like a strange request, but it is useful to have a featured image set up on each blog post when using WP because some social media channels use it to feature the blog post automatically, while others get the first image in the blog post.
There are also other benefits that are not very relevant to mention at this time.
Thank you for any help provided!
In the.single.php
of your theme maybe wrap one of those calls to the_post_thumbnail();
function in a div
that is hidden.
<?php if ( has_post_thumbnail() ): ?>
.hidden {
display: none !important;
}
Both of these thumbnails are not in the header, so I don’t really understand the conclusion that is in the premise of the question, but oh well …
Thank you for letting me know that .single.php needed some editing.
I removed a couple of lines and achieved the effect I was looking for.
Cheers!