I’m having an issue with this too.
if ( function_exists( '$Wppt->get_post_thumbnail' ) ) {
Messes things up. Or makes nothing display anyway.
If you take the rest of the code out of that – it works. But then you’re not checking for that function.
I have a ‘work-around’.
<?php //if ( function_exists( '$Wppt->get_post_thumbnail' ) ) {
$thumb = $Wppt->get_post_thumbnail( $post->ID, 'thumbnail_name' );
if ( !empty( $thumb ) ) { ?>
<a href="<?php echo get_permalink($post->ID); ?>" title="<?php echo $post->post_title; ?>"><img class="thumbnail" src="<?php echo $thumb['url']; ?>" title="<?php echo $thumb['title']; ?>" alt="<?php echo $thumb['alt']; ?>" width="<?php echo $thumb['width']; ?>" height="<?php echo $thumb['height']; ?>" /></a>
<?php } else { ?>
<a href="<?php echo get_permalink($post->ID); ?>" title="<?php echo $post->post_title; ?>"><img class="thumbnail" src="/imgs/generic_thumb.jpg" alt="image" width="220" height="120" /></a>
<?php } ?>
Nothing fancy. It just checks to see if there is a thumbnail for each post. If there isn’t it uses a generic thumbnail image – so be sure to make and post and link correctly to a generic thumbnail.
Thanks, johnbenedict! You workaround worked perfectly!!