<?php

/**
 * The template for displaying all single posts.
 *
 * @package chic_lifestyle
 */

get_header();

$layout = chic_lifestyle_get_sidebar_layout();

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

<div class="mb-48">
  <div class="container">
    <div class="row">

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

      <div class="<?php echo esc_attr($content_column_class); ?>">
        <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">
          <div class="mt-32"><?php get_sidebar(); ?></div>
        </div>
      <?php endif; ?>

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

<?php get_footer();
