wpexplorer

Alpha Show Featured Image

Sep 13th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <?php
  2. $img_url = wp_get_attachment_url(get_post_thumbnail_id(),'full'); // Get full URL to image
  3. if(img_url) {  ?>
  4.  <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="highlight-img"><img src="<?php echo $img_url; ?>" alt="<?php echo the_title(); ?>" /></a>
  5. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment