Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Flasy Buddy's method of displaying the featured image of a post or page in a WordPress template.
- <?php if (has_post_thumbnail( $post->ID ) ): ?>
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
- <div class="featured-thumbnail">
- <a href="<?php echo $image[0]; ?>" title=""><img src="<?php bloginfo(template_directory);?>/timthumb.php?src=<?php echo $image[0]; ?>&height=150&w=150&zc=0&q=90" alt="" /></a>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement