Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="thumbnail">
- <?php if ( has_post_thumbnail() ) { // the current post has a thumbnail
- } else echo '<img src="/wp-content/themes/yourtheme/images/default-thumb.jpg" />'; { // the current post lacks a thumbnail
- } ?>
- <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement