<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package Buconz Starter
 */
	
get_header(); ?>


	<?php if(get_theme_mod('buconz_starter_blog_single_breadcrumb', true)) : ?>
	<div class="breadcrumb blog-single">
		<div class="container">
			<div class="row">
				<div class="col-12">
					<div class="bread-inner">
						<div class="bread-menu"><?php if (function_exists('bcn_display')) bcn_display(); ?></div>
						<div class="bread-title">
							<h1><?php the_title() ?></h1>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<?php endif; ?>

	<section class="blog-single section-padding">
		<div class="container">
			<div class="row">
				<div class="col-lg-8 col-md-8 col-12">
					<div class="row">
						<div class="col-12">
						<?php
							while ( have_posts() ) :
								the_post();
								get_template_part( 'template-parts/content', 'single' );
								
								// If comments are open or we have at least one comment, load up the comment template.
								if ( comments_open() || get_comments_number() ) :
									comments_template();
								endif;
								endwhile; // End of the loop.
							?>
						</div>
					</div>
				</div>
				<?php if(is_active_sidebar('buconz-starter-blog-single-sidebar')) : ?>
				<div class="col-lg-4 col-12">
					<aside class="sidebar-main"> 
						<?php dynamic_sidebar('buconz-starter-blog-single-sidebar'); ?>
					</aside>
				</div>
				<?php else :?>
				<?php get_sidebar();?>
				<?php endif;?>
			</div>
		</div>
	</section>
<?php
get_footer();
