Only first featured image appearing in homepage (2 posts)

  1. Diomedes
    Posted 2 years ago #

    I added featured images to my blog, using the code below in both single.php and index.php. (The site is heavily customized from the White as Milk theme, which doesn't support featured images.)

    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.

    That works great on each individual post. But in the homepage, only the featured image attached to the most recent post shows up. What can I do to make the rest appear?

    [no bumping please]

  2. linux4me2
    Posted 2 years ago #

    Most theme's home pages have a loop based on a query that pulls X number of posts from the database. It sounds like you may have added the code outside that loop, so it only fires for one post. You can probably fix it by moving the code into the loop.

Topic Closed

This topic has been closed to new replies.

About this Topic