<?php
 /* Grid */
 defined( 'ABSPATH' ) || exit; // Exit if accessed directly
 $tag = (is_category() || is_singular() ) ? 'h3' : 'h2';
?>
<div class="col-6 col-md-4 toinfinite">
  <div class="kanews-post-item kanews-post-grid-item ">
    <a href="<?php the_permalink(); ?>" class="kanews-post-href" aria-label="<?php the_title(); ?>"></a>
    <?php kanews_post_thumbnail('full', 'kanews-post-comp-thumb'); ?>
    <div class="kanews-post-content">
    <?php echo get_the_term_list($post->ID, 'kategori', '<div class="kanews-post-meta">', ', ', '</div>'); ?>

      <?php the_title( sprintf( '<'.$tag.' class="kanews-post-headline truncate truncate-2"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></'.$tag.'>' ); ?>

      <div><i class="icon-star"></i> <?php echo ci_comment_rating_get_average_ratings($post->ID); ?></div>

    </div>
  </div>
</div>