<?php 

$blog_single_cat = ethrik_get_option('blog_single_cat');
$blog_single_author= ethrik_get_option('blog_single_author', false); 
$blog_single_navigation = ethrik_get_option('blog_nav');
$blog_single_taglist = ethrik_get_option('blog_tags');

$display_blog_single_title= ethrik_get_option('display_blog_single_title', true); 
$blog_single_breadcrumb= ethrik_get_option('blog_single_breadcrumb', true); 
$blog_single_title= ethrik_get_option('blog_single_title'); 


?>

	<?php if($display_blog_single_title == true) : ?>
    <div class="theme-breadcrumb__Wrapper theme-breacrumb-area">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-12">

                	<h1 class="theme-breacrumb-title">
						<?php echo $blog_single_title; ?>
					</h1>

					<?php if($blog_single_breadcrumb == true) : ?>
					<div class="breadcrumb-nav-top">
						<ul>
							<li class="breadcrumb-home-menu"><a href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('Home', 'ethrik'); ?></a></li>
							<li class="breadcrumb-item-menu"><?php esc_html_e('Blog Details', 'ethrik'); ?></li>
						</ul>
					</div>
					<?php endif; ?>

				</div>
            </div>
        </div>
    </div>
	<?php endif; ?>
    <!-- Blog Breadcrumb End -->

<div id="main-content" class="bloglayout__One main-container blog-single post-layout-style2 single-one-bwrap"  role="main">
	<div class="container">
		<div class="row single-blog-content">

		<div class="<?php if(is_active_sidebar('sidebar-1')) { echo "col-lg-8"; } else { echo "col-lg-12";}?> col-md-12">
		<?php while (have_posts()):
		the_post(); ?>

			<article id="post-<?php the_ID(); ?>" <?php post_class(["post-content", "post-single"]); ?>>

				<div class="blog_layout_one_Top">

					<?php if ( has_post_thumbnail() && !post_password_required() ) : ?>
					<div class="post-featured-image">
					<?php if(get_post_format()=='video'): ?>
						<?php get_template_part( 'template-parts/single/post', 'video' ); ?>  
						<?php else: ?>
						<img class="img-fluid" src="<?php echo esc_url(get_the_post_thumbnail_url()); ?>" alt="<?php the_title_attribute(); ?>">
						<?php endif; ?>
					</div>
					<?php endif; ?>

					<div class="post-header-style1">
						<header class="entry-header clearfix single-blog-header">
						
						<?php if($blog_single_cat == true) :?>
						<div class="slider-category-box tab-cat-box">
							<?php require ETHRIK_THEME_DIR . '/template-parts/cat-alt-template.php'; ?>
						</div>
						<?php endif; ?>	
						
						<h1 class="post-title single_blog_inner__Title">
						<?php the_title(); ?>
						</h1>

						<div class="blog-layout-meta-box blog-details-metabox">

							<div class="blog-meta-box-date">
								<?php echo esc_html( get_the_date( 'F j, Y' ) ); ?>
							</div>

							<div class="blog-meta-box-comment">
								
								<?php echo get_comments_number(); ?> <?php esc_html_e('Comments', 'ethrik'); ?>
								
							</div>
						</div>	


						</header>
					</div>  

				</div>
							
				<div class="theme-blog-details">
				

				
				<div class="post-body clearfix single-blog-header single-blog-inner blog-single-block blog-details-content">
					<!-- Article content -->
					<div class="entry-content clearfix">
						
						<?php
						if ( is_search() ) {
							the_excerpt();
						} else {
							the_content();
							ethrik_link_pages();
						}
						?>
						
					<?php if(has_tag() && $blog_single_taglist == true ) : ?>
					<div class="post-footer clearfix theme-tag-list-wrapp">
						<?php ethrik_single_post_tags(); ?>
					</div>
					 
					<?php endif; ?>	

					</div>
				</div>
				
				</div>
							
			</article>

				<?php if($blog_single_author == true) :?>
					<?php ethrik_theme_author_box(); ?>
				<?php endif; ?>
			
			   <?php if($blog_single_navigation == true) :?>
					<?php ethrik_theme_post_navigation(); ?>
				<?php endif; ?>

				<?php comments_template(); ?>
				<?php endwhile; ?>
			</div>
					
			<?php get_sidebar(); ?>

		</div>
		
	</div> 
	
</div>






