<?php
/**
 * The template for displaying archive pages.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package StoreX
 */

get_header();
?>
<section id="post-<?php the_ID(); ?>" <?php post_class('sidebar-page-container blog-grid pt_80 pb_80'); ?>>
	<div class="large-container">
		<div class="row clearfix">
			<div class="col-lg-9 col-md-12 col-sm-12 content-side">
				<div class="blog-details-content mr_30">
					<?php if( have_posts() ): ?>
						<?php while( have_posts() ): the_post(); ?>
							<div class="news-block-one">
								<div class="inner-box">
									<?php if ( has_post_thumbnail() ) : ?>
										<div class="image-box">
											<figure class="image"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_post_thumbnail(); ?></a></figure>
										</div>
									<?php endif; ?>	
									<div class="lower-content clearfix">
										<ul class="post-info">
											<li class="category"><?php the_category(' '); ?></li>
											<li class="author"><?php esc_html_e('By','storex'); ?> <a href="<?php echo esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) ));?>"><?php echo esc_html( get_the_author() ); ?></a></li>
											<li class="date">
												<a href="<?php echo esc_url(get_month_link(get_post_time('Y'),get_post_time('m'))); ?>"><span><?php echo esc_html(get_the_date('j')); ?></span> <?php echo esc_html(get_the_date('M')); ?></a>
											</li>
										</ul>
										<?php the_title('<h2 class="post-title">', '</h2>' ); 
										the_content( 
											sprintf( 
												__( 'Read More', 'storex' ), 
												'<span class="screen-reader-text">  '.esc_html(get_the_title()).'</span>' 
											) 
										); ?>
									</div>
								</div>
							</div>
						<?php endwhile; ?>
					<?php endif; ?>
					<?php if ( has_tag() ) : ?>
						<div class="post-share-option pb_50 mb_30">
							<ul class="tags-list">
								<li><span><?php esc_html_e('Tags:', 'storex'); ?></span></li>
								<li><?php the_tags(' ', ' ', ' '); ?></li>
							</ul>
						</div>
					<?php endif; ?>

					<?php comments_template( '', true ); // show comments  ?>
				</div>
			</div>
			<div class="col-lg-3 col-md-12 col-sm-12 sidebar-side">
				<?php get_sidebar(); ?>
			</div>
		</div>
	</div>
</section>
<?php get_footer(); ?>