<?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 may use a
 * different template.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Hotel 26
 */

get_header();

$hotel_26_default_pg_sidebar = get_theme_mod('hotel_26_default_pg_sidebar','left_sidebar');
$id =  ( $hotel_26_default_pg_sidebar == 'no_sidebar' ) ? '' :'id=av-primary-content'; /* leave as it */
$colm = ( $hotel_26_default_pg_sidebar == 'no_sidebar' ) ? '12' :'8';
?>
<section id="post-section" class="post-section st-py-default">
	<div class="container">
		<div class="row">
			<?php ( $hotel_26_default_pg_sidebar == 'left_sidebar' ) ? get_sidebar() : ''; ?>
			 <?php			
					echo '<div '.esc_attr($id).' class="col-12 col-md-'.esc_attr($colm).'">';
				 			 
					if( have_posts()) :  the_post();
					
					the_content(); 
					endif;
					
					if( $post->comment_status == 'open' ) { 
						 comments_template( '', true ); // show comments 
					}
				?>
				<!-- Pagination -->
				<?php		
					wp_link_pages( array(
						'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'hotel-26' ),
						'after'  => '</div>',
					) );
					// Previous/next page navigation.
					the_posts_pagination( array(
					'prev_text'          => '<i class="fa fa-angle-left"></i>',
					'next_text'          => '<i class="fa fa-angle-right"></i>',
				) ); ?>
				<!-- Pagination -->
			</div>
			<?php ( $hotel_26_default_pg_sidebar == 'right_sidebar' ) ? get_sidebar() : ''; ?>
		</div>
	</div>
</section>
<?php get_footer(); ?>