/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if( get_post_meta( $post->ID, "thumbnail", true ) ) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" class="thumb"> <img src="<?php echo get_post_meta( $post->ID, "thumbnail", true ); ?>" alt="<?php the_title(); ?>" width="" /> </a> <?php }else{ ?> <a href="<?php the_permalink() ?>" rel="bookmark" class="thumb"> <img src="<?php bloginfo('template_directory'); ?>/images/temp.gif" alt="Image Coming Soon" width="" /> <span></span> </a> <?php } ?>
Comments
