In your function virtarich_katalog_function
wrap the thumbnail with an <a>
link tag like this:
function virtarich_katalog_function() {
global $post;
$vtr_query = new WP_Query('showposts=10000');
while ($vtr_query->have_posts()) : $vtr_query->the_post(); ?>
<div class="col-md-3 ikibro">
<div class="wpagen-produk">
<div class="katalog-gambar-center">
<div class="katalog-gambar"><a href="https://wordpress.stackexchange.com/questions/260406/<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php virtarich_thumb_normal() ?></a></div>
</div>
<div class="katalog-title"><?php the_title(); ?></div>
<div class="katalog-harga">Rp <?php virtarich_harga(); ?><span class="coret"><?php virtarich_harga_coret(); ?></span></div>
<?php if(get_post_meta($post->ID, "kode", $single = true) != ""){ ?>
Kode : <?php echo get_post_meta($post->ID, "kode", $single = true);
} ?>
<br/>
<?php if(get_post_meta($post->ID, "habis", $single = true)){ ?>
<div class="habis senter">habis</div>
<?php } else if(get_post_meta($post->ID, "stok", $single = true) != ""){ ?>
Stok : <?php echo get_post_meta($post->ID, "stok", $single = true);?>
<?php } ?>
</div>
</div>
to be more clear this is the line:
<div class="katalog-gambar"><a href="https://wordpress.stackexchange.com/questions/260406/<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php virtarich_thumb_normal() ?></a></div>