Try to use the has_post_thumbnail function.
From the codex:
<?php
//This must be in one loop
if(has_post_thumbnail()) {
the_post_thumbnail();
} else {
echo '<img src="'.get_bloginfo("template_url").'/images/img-default.png" />';
}
?>
Try to use the has_post_thumbnail function.
From the codex:
<?php
//This must be in one loop
if(has_post_thumbnail()) {
the_post_thumbnail();
} else {
echo '<img src="'.get_bloginfo("template_url").'/images/img-default.png" />';
}
?>