<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package Travel Tour
 */

get_header();

$sidebar_layout = travel_tour_get_sidebar_layout();
if( $sidebar_layout == 'no-sidebar' ) {
  $content_column_class = 'col-md-12';
} else {
  $content_column_class = 'col-md-9';
}
?>
<div class="my-64">
	<div class="container-xl">
		<div class="row">

			<?php if ( $sidebar_layout == 'left-sidebar' ) : ?>
	      <div class="col-md-3"><?php get_sidebar(); ?></div>
	    <?php endif; ?>

			<section class="d-flex flex-column <?php echo esc_attr( $content_column_class ); ?>">
        <?php while ( have_posts() ) : the_post(); ?>
            <?php get_template_part( 'template-parts/content', 'page' ); ?>   
        <?php endwhile; // End of the loop. ?> 
        <?php comments_template(); ?>
			</section>

			<?php if( $sidebar_layout == 'right-sidebar' ) : ?>
	      <div class="col-md-3"><?php get_sidebar(); ?></div>
	    <?php endif; ?>
			
		</div>
	</div>
</div>
</div>
<?php get_footer(); ?>