[Resolved] Disable Feature image on first post

Home Forums Support [Resolved] Disable Feature image on first post

Home Forums Support Disable Feature image on first post

  • This topic has 4 replies, 2 voices, and was last updated 9 years ago by Tom.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #99164
    Aaron Redman

    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

    #99307
    Tom
    Lead Developer
    Lead Developer

    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;
    }
    #99706
    Aaron Redman

    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

    #100267
    Aaron Redman

    Looks like it worked, THANKS!

    #100272
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.