<?php
$blog_title_length = cs_get_option('blog_title_length');
$blog_author_show = cs_get_option('blog_author_show');
$blog_date_show = cs_get_option('blog_date_show');

$blog_author_show = is_null($blog_author_show) ? true : $blog_author_show;
$blog_date_show = is_null($blog_date_show) ? true : $blog_date_show;
?>
<div class="pfy-post-grid-wrap  grid-style-6 row">
	<?php while ( have_posts() ) : the_post(); ?>
		<div id="post-<?php the_ID(); ?>" <?php post_class('col-lg-4 col-md-6 '); ?>>
			<div class="pfy-post-item item-act pfy-scale">
				<?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( 'full' ); ?></a>
					</div>
				<?php endif; ?>
				<div class="pfy-post-content">
					<?php benqu_category_name();?>
					<h4 class="pfy-post-title">
						<a href="<?php the_permalink(); ?>"><?php echo esc_html( wp_trim_words(get_the_title(), $blog_title_length, '...') ); ?></a>
					</h4>

					<?php if($blog_author_show == true || $blog_date_show == true): ?>
						<ul class="pfy-post-gd-meta">
							<?php if($blog_author_show == true){ ?> <li><i class="far fa-user"></i> <?php the_author_posts_link(); ?></li> <?php } ?>
							<?php if($blog_date_show == true){ ?> <li><i class="fal fa-calendar-alt"></i> <?php echo get_the_date(); ?></li> <?php } ?>
						</ul>
					<?php endif; ?>
				</div>
			</div>
		</div>
	<?php endwhile; ?>
</div>
