Posted By

sridhar on 07/31/11


Tagged

wordpress


Versions (?)

For showing excerpts w/ thumbnails on Posts page


 / Published in: PHP
 

  1. // index.php:
  2.  
  3. <?php if (has_post_thumbnail()) { ?>
  4. <div class="front-page-thumbnail">
  5. <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('front-page-thumbnail'); ?></a>
  6. </div>
  7. <?php } ?>
  8. <div class="post-content">
  9. <?php the_excerpt(); ?>
  10. </div>
  11.  
  12. // functions.php:
  13. add_image_size('front-page-thumbnail', 150, 150, true);

Report this snippet  

You need to login to post a comment.