<?php 
$tag = 'h3';
$comp = [
  'name' => get_post_meta($post->ID, "ilan_name", true ) ? get_post_meta($post->ID, "ilan_name", true ) : get_the_title(),
  'city' => get_post_meta($post->ID, "ilan_city", true ) ? get_post_meta($post->ID, "ilan_city", true ) : esc_html__( 'Türkiye', 'kanews' ),
  'town' => get_post_meta($post->ID, "ilan_town", true ) ? ' / '.get_post_meta($post->ID, "ilan_town", true ) : '',
];
?>

<?php
 /* Grid */
 defined( 'ABSPATH' ) || exit; // Exit if accessed directly
?>
<div class="<?php echo isset($args['col']) ? $args['col'] : 'col-6 col-md-4'; ?> toinfinite ">
  <div class="kanews-post-item kanews-post-grid-item">
    <?php kanews_post_thumbnail('kanews-post-1', 'kanews-post-thumb', true); ?>
    <div class="kanews-post-content">
      <div class="kanews-ilan-cities">
        <?php echo (get_the_term_list( $post->ID, 'ilan-il', '', ', ' )) ? get_the_term_list( $post->ID, 'ilan-il', '', ' ' ) : $comp['city']; ?>
        <?php echo ( get_the_term_list( $post->ID, 'ilan-ilce', '', ', ' )) ? get_the_term_list( $post->ID, 'ilan-ilce', '', ' ' ) : $comp['town']; ?>
      </div>
      <?php the_title( sprintf( '<'.$tag.' class="kanews-post-headline truncate truncate-2"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></'.$tag.'>' ); ?>
      
      <?php echo kanews_post_date('post', 'div'); ?>
</div>
  </div>
</div>