Posted By

hstothard on 02/08/10


Tagged

wordpress


Versions (?)

Wordpress - Custom field thumbnail


 / Published in: PHP
 

  1. <?php if( get_post_meta( $post->ID, "thumbnail", true ) ) { ?>
  2. <a href="<?php the_permalink() ?>" rel="bookmark" class="thumb">
  3. <img src="<?php echo get_post_meta( $post->ID, "thumbnail", true ); ?>" alt="<?php the_title(); ?>" width="" />
  4. </a>
  5.  
  6. <?php }else{ ?>
  7. <a href="<?php the_permalink() ?>" rel="bookmark" class="thumb">
  8. <img src="<?php bloginfo('template_directory'); ?>/images/temp.gif" alt="Image Coming Soon" width="" />
  9. <span></span>
  10. </a>
  11. <?php } ?>

Report this snippet  

You need to login to post a comment.