<article class="article-seven">
<figure class="mb-0 position-relative">
  <a href="<?php the_permalink(); ?>">
    <img src="<?php if(get_the_post_thumbnail_url()): ?>
<?php the_post_thumbnail_url('full'); ?>
<?php else: ?>
<?php echo wc_placeholder_img_src(); ?>
<?php endif; ?>" alt="article" class="w-100 d-block" />
  </a>
</figure>
<div class="content">
  <div class="info position-relative">
    <h2 class="text-truncate">
      <a href="<?php the_permalink(); ?>"><?php
$title = get_the_title();
if ( wp_is_mobile() ) {
    echo wp_trim_words( $title, 5, '...' );
} else {
    echo wp_trim_words( $title, 8, '...' );
}
?></a>
    </h2>
    <p><?php echo get_the_excerpt(); ?> </p>
  </div>
  <ul class="d-flex align-items-center justify-content-between">
    <li><?php echo get_the_date(); ?></li>
    <?php
        $category = get_the_category(); 
        ?>
        <a href="<?php echo site_url('/category/') . $category[0]->slug; ?>"> <li> <b> <?php esc_html_e('Category:', 'kavehTheme'); ?> </b> <?php echo $category[0]->cat_name; ?> </li></a></ul>
</div>
</article>