Skip to content

Instantly share code, notes, and snippets.

@xafarali
Created June 9, 2013 22:19
Show Gist options
  • Save xafarali/5745486 to your computer and use it in GitHub Desktop.
Save xafarali/5745486 to your computer and use it in GitHub Desktop.
Post Thumbnail in Loop
<?php if ( has_post_thumbnail()) : ?>
<span class="post-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_post_thumbnail('thumbnail'); ?></a>
</span>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment