Advertisement
Guest User

Justin Parks

a guest
Feb 20th, 2010
787
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <div class="thumbnail">
  2. <?php if ( has_post_thumbnail() ) { // the current post has a thumbnail
  3. } else echo '<img src="/wp-content/themes/yourtheme/images/default-thumb.jpg" />'; { // the current post lacks a thumbnail
  4. } ?>
  5.  
  6. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
  7. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement