Loop doesn’t give the thumbnail the right parent (or class)
You are incorrectly using <img tag.. you’d better use <div>: echo ‘<div class=”front-thumb”>’.get_the_post_thumbnail(‘medium’).'</div>’; p.s. it seems you donk fully understand HTML coding. better to learn the basics.