/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// index.php: <?php if (has_post_thumbnail()) { ?> <div class="front-page-thumbnail"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('front-page-thumbnail'); ?></a> </div> <?php } ?> <div class="post-content"> <?php the_excerpt(); ?> </div> // functions.php: add_image_size('front-page-thumbnail', 150, 150, true);
Comments
