<?php
/**
 * Template part for displaying results in search pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package benqu
 */
$blog_btn_text = cs_get_option('blog_btn_text');
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('pfy-default-post-ly'); ?>>    
    <div class="pfy-post-item">
        <?php if(has_post_thumbnail()):?>
        <div class="pfy-post-thumb pfy-img-commn-style">
            <a class="post-thumb" href="<?php the_permalink();?>"><?php the_post_thumbnail( 'benqu-img-size5' );?></a>
                <?php benqu_category_badge();?>
        </div>
        <?php endif;?>
        <div class="pfy-post-content">
			<h2 class="pfy-post-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
			<ul class="pfy-post-gd-meta">
				<li><i class="far fa-user"></i> <?php the_author_posts_link(); ?></li>
				<li><i class="fal fa-calendar-alt"></i> <?php echo esc_html(get_the_time( get_option('date_format')));?></li>
				<li>
					<i class="far fa-comments"></i> <?php echo esc_attr(get_comments_number());?> 
				<?php
					if(get_comments_number() == 1){
						esc_html_e( 'Comment', 'benqu' );
					}else{
						esc_html_e( 'Comments', 'benqu' );
					}					 
				?>
				</li>
			</ul>
			<div class="pfy-content-excerpt">
				<?php the_excerpt();?>
			</div>
			<div class="pfy-readmore-btn">
				<a href="<?php the_permalink();?>" class="pfy-btn pfy-btn-primery"><?php if(isset($blog_btn_text) && !empty($blog_btn_text)){echo esc_html($blog_btn_text);}else{esc_html_e( 'Read More', 'benqu' );}?></a>
			</div>
		</div>
    </div>
</article><!-- #post-<?php the_ID(); ?> -->
