Archived topic
Disable Feature image on first post
4 replies · Started by Aaron Redman on April 16, 2015
Hi Tom,
I have my homepage set up using a child theme so that the most recent post appears in full and the rest as excerpts. I want the featured image to show up for the excerpts but I donot want it to show up for the full post, which is my most recent one as it is always repeated in the body of the post. I disable it for the individual post page already, but how can I disable it for this first post on my homepage?
Thanks!
Aaron
Hi Aaron,
Try adding this function to your child theme functions.php file: https://gist.github.com/generatepress/9163f26ce0f197541c85
Then you can target that first image with a class:
.blog .first .post-image,
.archive .first .post-image {
display: none;
}
thanks for your help. I won't get a chance to try this out until sunday or Monday but I will let you know how it works when I do. :)
Aaron
Looks like it worked, THANKS!
You're welcome :)