<?php $kproduct = get_query_var('kproduct'); ?>
<article class="article">
  <figure>
    <a href="<?php echo $kproduct['link'] ?>">
      <img src="<?php echo $kproduct['kaveh_custom']['thumbnail_url'] ?>" alt="<?php echo $kproduct['title']['rendered']; ?>" class="d-flex w-100" />
    </a>
    <div class="category-time">
      <?php
      $category = get_the_category($kproduct['id']); 
      ?>
      <a href="<?php echo site_url('/category/') . $category[0]->slug; ?>">
      <?php
        echo $category[0]->cat_name;
        ?>
      </a>
      <span> <?php echo $kproduct['kaveh_custom']['date']; ?> </span>
    </div>
  </figure>
  <h2>
    <a href="<?php echo $kproduct['title']['rendered']; ?>"> <?php echo $kproduct['title']['rendered']; ?></a>
  </h2>
  <p> <?php echo $kproduct['kaveh_custom']['excerpt']; ?></p>
</article>