Advertisement
Guest User

Untitled

a guest
Feb 13th, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4. $thumbnails = get_posts('numberposts=4');
  5. foreach ($thumbnails as $thumbnail) {
  6. if ( has_post_thumbnail($thumbnail->ID)) {
  7. echo '<a href="' . get_permalink( $thumbnail->ID ) . '" title="' . esc_attr( $thumbnail->post_title ) . '">';
  8. echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail');
  9. echo '</a>';
  10. }
  11. }
  12. php
  13. do_action('skeleton_after_content');
  14. get_footer();
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement