<?php 

    $comments_number = get_comments_number();
    if($comments_number > 1 || $comments_number == 0) {
        $text_comment = esc_html__(' Comments','idealauto');
    }else {
        $text_comment = esc_html__(' Comment','idealauto');
    }
?>
<div class="jws_post_wap">
    <div class="jws_post_image">
    <span class="entry-date">
        <span class="date_day">
             <?php echo get_the_date( 'j' ); ?>
        </span>
        <?php echo get_the_date( 'M' ); ?>
    </span>
        <?php 

                 $attach_id = get_post_thumbnail_id();
        
                 $img = jws_getImageBySize(array('attach_id' => $attach_id, 'thumb_size' => $settings['blog_image_size'], 'class' => 'attachment-large wp-post-image'));
                 echo '<a href="'.get_the_permalink().'">';
                 echo ''.$img['thumbnail'];
                 echo '</a>';
        
      ?>

    </div>
    <div class="jws_post_content">
           <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> 
           <div class="jws_post_meta">
                <div class="left">
                    <span class="post_author"><?php echo '<a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'">'.get_the_author(); ?></a></span> 
                    <span class="post_cat"><?php echo '<span>'.esc_html__('In ','idealauto').'</span>'.get_the_term_list(get_the_ID(), 'category', '', ', '); ?></span>  
                </div>
                <div class="right">
                    <a href="<?php echo get_the_permalink().'#comments'; ?>" class="entry-comment"><span class="far fa-comment"></span><?php echo ''.$comments_number.$text_comment; ?></a>
                    <span class="entry-like"><?php if(function_exists('post_favorite')) echo esc_attr(post_favorite()); ?></span>
                    <span class="entry-view"><span class="far fa-eye"></span><?php echo jws_gt_get_post_view(); ?></span>
                </div>
           </div>
           <div class="jws_post_excerpt">
                    <?php  echo (!empty($settings['excerpt_length'])) ? wp_trim_words( get_the_excerpt(), $settings['excerpt_length'], $settings['excerpt_more'] ) : get_the_excerpt();?>
           </div>
           <a href="<?php the_permalink(); ?>" class="jws_post_readmore">
                <?php echo esc_html($settings['readmore_text']); ?><span class="icon-arrows-1"></span>
           </a>
    </div>
</div>

  
