<?php 
$show_blog_btn= get_theme_mod('show_post_btn', true); 
$show_blog_content= get_theme_mod('show_post_content', true); 

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-list col-xl-12' ); ?> >

	<div class="blog-item mb-30">

		<div class="container">
			<div class="row">
				<div class="col-xl-6">
					<?php if(has_post_thumbnail()){ ?>
						<div class="post-thumb">
							<a href="<?php the_permalink();?>">
								<?php the_post_thumbnail( 'edify_blog', ['class' => 'img-responsive'] );?>
							</a>
						</div>
					<?php } ?>	
				</div>
				
				<div class="col-xl-6">
					<div class="blog-content">
						<div class="post-meta">
							<span class="post-author"><?php edify_posted_by();?></span>
							<span class="post-date"><i class="fa fa-calendar-alt mr-2"></i><?php echo get_the_time('M d, Y');?></span>
							
						</div>
						<h3 class="post-title"> <a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
						
						<?php if($show_blog_content): ?>
						<?php the_excerpt();?>
						<?php endif; ?>


						<?php if($show_blog_btn): ?>
							<a class="btn btn-grey btn-sm" href="<?php the_permalink()?>"><?php echo esc_html__('Read More','edify');?></a>
						<?php endif; ?>

						<?php wp_link_pages(
							array(
								'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'edify' ),
								'after'  => '</div>',
							)
						); ?>
					</div>
				</div>
			</div>
		</div>
	</div>
</article>

