<?php
/* 
* Template Name: Left Sidebar
* Template Post Type: page
* @package Glaciers
* @since 1.0.0
*/

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}

get_header(); ?>

<div class="container">
	<div class="row">
		<div class="col">

			<?php // Insert page featured image
			glaciers_post_thumbnail(); ?>

			<header id="page-header">
				<?php the_title('<h1 class="entry-title">', '</h1>');
				if (has_excerpt() && !is_archive() && !is_search() && !is_404()) {
					echo '<div class="page-excerpt lead">', the_excerpt() . '</div>';
				}
				?>
			</header><!-- .entry-header -->
		</div>
	</div>

	<div class="row">

		<div class="col-lg-8 order-1 order-2">

			<?php
			while (have_posts()) :
				the_post();

				get_template_part('template-parts/content', 'page');

				// 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 class="col-lg-4">
			<?php // Get our sidebar		
			get_sidebar(); ?>
		</div>

	</div>
</div>

<?php
get_footer();
