Skip to content

Instantly share code, notes, and snippets.

@leonardorb
Created March 17, 2012 16:40
Show Gist options
  • Select an option

  • Save leonardorb/2062014 to your computer and use it in GitHub Desktop.

Select an option

Save leonardorb/2062014 to your computer and use it in GitHub Desktop.
<?php $recent = new WP_Query("cat=4&showposts=3"); $count=1; while($recent->have_posts()) : $recent->the_post();?>
<?php if($count==1): the_post_thumbnail('thumbnail'); endif; ?>
<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
<?php $count++; endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment