JSFiddle - React, Tailwind, and code Playground
HTML
<?php if ( has_post_thumbnail() && is_eye_catch_visible() ): // サムネイルを持っているときの処理 ?>
<div class="eye-catch">
<?php
//the_post_thumbnail( 'large');
the_post_thumbnail();
if( get_post( get_post_thumbnail_id() )->post_excerpt ) {
echo '<span>' . get_post( get_post_thumbnail_id() )->post_excerpt . '</span>';
}
?>
</div>
<?php endif; ?>