Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( has_post_thumbnail() ) { ?>
- <?php
- $imgsrcparam = array(
- 'alt' => trim(strip_tags( $post->post_excerpt )),
- 'title' => trim(strip_tags( $post->post_title )),
- );
- $thumbID = get_the_post_thumbnail( $post->ID, 'two', $imgsrcparam ); ?>
- <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
- <?php } else {?>
- <div class="preview"><a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a></div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement