Support » Themes and Templates » Only first featured image appearing in homepage

  • 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]

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Only first featured image appearing in homepage’ is closed to new replies.