Try to replace the block in the middle of the query with this code:
<?php if ( has_post_thumbnail()) {
the_post_thumbnail();
} else {
the_title( '<h4>', '</h4>');
} ?>
Try to replace the block in the middle of the query with this code:
<?php if ( has_post_thumbnail()) {
the_post_thumbnail();
} else {
the_title( '<h4>', '</h4>');
} ?>