<?php if(has_post_thumbnail()): ?>
    <?php if($blog_cat_show == 'yes'): $cat = get_the_category(); ?>
        <a 
            class="post-cat" 
            href="<?php echo get_category_link($cat[0]->term_id); ?>"
            style="<?php echo esc_attr(vinkmag_cat_style($cat[0]->term_id)); ?>"
            >
            <?php echo get_cat_name($cat[0]->term_id); ?>
        </a>
    <?php endif; ?>
    <div class="ts-post-thumb">
        <a href="<?php the_permalink() ?>">
            <img 
                class="img-fluid" 
                src="<?php echo esc_url(vinkmag_post_thumbnail(get_the_ID())); ?>" 
                alt="<?php echo esc_attr(vinkmag_alt(get_the_ID())); ?>">
        </a>
    </div>
<?php endif; ?>