Echo Placeholder Image, если Post Manhcnail не найдена

<?php if ( has_post_thumbnail()) {
  the_post_thumbnail($post->ID);
  } else { ?>
  <img class="post-placeholder-img" src="https://via.placeholder.com/300" alt="<?php the_title(); ?>" />
<?php } ?>
Bongani