<?php
 /* Grid */
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly
  $tag = (is_category() || is_singular() ) ? 'h3' : 'h2';
  $ilan_no = get_post_meta( get_the_ID(), 'kanews_bik_id', true);
?>
<div id="<?php echo 'bik-ilan-'.esc_attr($ilan_no); ?>" class="col-6 col-lg-4 toinfinite bik-ilan">
  <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 do_action('kanews_post_hook'); ?>
    <?php kanews_post_thumbnail('kanews-post-1', 'kanews-post-thumb'); ?>
    <div class="kanews-post-content">
      <?php echo kanews_primary_category($post->ID, 'style-2'); ?>
      <?php echo kanews_post_date('post', 'span'); ?>
      <?php the_title( sprintf( '<'.$tag.' class="kanews-post-headline truncate truncate-2"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></'.$tag.'>' ); ?>
    </div>
  </div>
</div>