Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if(has_post_thumbnail($post->ID, 'thumbnail')):
- $image_id = get_post_thumbnail_id($post->ID);
- $image_url = wp_get_attachment_image_src($image_id, 'thumbnail', true); ?>
- <a href="<?php echo get_permalink($post->ID) ?>" class="post-thumb"><img src="<?php echo $image_url[0]; ?>" alt="<?php echo $post->post_title ?>" /></a>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment