<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package bootstrap_coach
 */

get_header();

$layout = bootstrap_coach_get_sidebar_layout();
if( $layout == 'no-sidebar' ) {
  $content_column_class = 'col-sm-12';
} else {
  $content_column_class = 'col-sm-8';
}
?>

<div class="inside-page content-area" id="primary">
	<div class="container">	
		<div class="row">

			<?php if ( $layout == 'left-sidebar' ) : ?>
        <div class="col-sm-4"><?php get_sidebar(); ?></div>
      <?php endif; ?>

      <div class="<?php echo esc_attr( $content_column_class ); ?>" id="main-content">
				<section class="page-section">
					<div class="detail-content">

						<?php while ( have_posts() ) : the_post(); ?>
							<?php get_template_part( 'template-parts/content', 'single' ); ?>
						<?php endwhile; // End of the loop. ?>
						<?php comments_template(); ?>

					</div><!-- /.end of deatil-content -->
				</section> <!-- /.end of section -->
			</div>

			<?php if( $layout == 'right-sidebar' ) : ?>
		    <div class="col-sm-4"><?php get_sidebar(); ?></div>
		  <?php endif; ?>

		</div>
	</div>
</div>
<!-- #main -->

<?php get_footer();