I’m trying to display 2 recent posts from a specific category and show the thumbnail image from that post on the home page (as you can see from link below) - the issue is with the second post, the thumbnail does not display correctly.
Here’s my code:
<div class="indexBlog">
<ul>
<?php $recent = new WP_Query('category_name=recipes&showposts=2'); while($recent->have_posts()) : $recent->the_post();?>
<li><div class="RecipeImage"><?php the_post_thumbnail('thumbnail'); ?></div>
<span class="upper"><a style="text-decoration:none;" href="<?php the_permalink() ?>"><?php the_title(); ?></a></span><br/><span class="OrganicBoxInfo"><?php the_excerpt(); ?></span></li>
<?php endwhile; ?>
</ul>
</div>
Here’s the link Hinrichs Trading Company
The location on the page of this issue is under “Recipes” - if you’ll notice the first thumbnail image is perfect, the second one however looks odd…
Help would be greatly appreciated! I’m stumped… I’m sure its obvious where my mistake is but I’ve looked at it for so long now I can’t see it…