UNTESTED:
Something like this might be easier to manage, add to your theme functions.php file:
Code:
function get_custom_thumb( $post_id ) {
// get_post_meta returns a string
if ( $my_thumb = get_post_meta($post_id, 'thumb', true) )
{
return '<img src="' . $my_thumb . '">';
}
// get_the_post_thumbnail returns the html img src
if ( $my_thumb = get_the_post_thumbnail($post_id, 'thumbnail') )
{
return $my_thumb;
}
// return your own html placeholder image
return '<img src="http://yoursite.com/image.jpg" />';
}
Then, in your template just use this where you want it displayed:
Code:
<?php echo get_custom_thumb( $post->ID ); ?>