<?php get_header(); ?>

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

		<!-- page-title-module
			================================================== -->
		<section class="page-title">
			<div class="container">
				<h1 class="page-title__title"><?php the_title(); ?></h1>
				<?php $subtitle = get_post_meta($wp_query->get_queried_object_id(), "_triptip_banner_subtitle", true); ?>
				<?php if($subtitle!=''){ ?>
					<span class="page-title__description"><?php echo esc_html($subtitle); ?></span>
				<?php } ?>
				
			</div>
		</section>
		<!-- End page-title-module -->

		<!-- blog-page block
			================================================== -->
		<section class="blog-page">
			<div class="container">
				<div class="row">
					<?php if(is_active_sidebar('sidebar-1')){ ?>
		            <div class="col-md-8">
		            <?php }else{ ?>
		            <div class="col-md-12">
		            <?php } ?>
						<div class="blog-page__box">
							
							<div class="single-content">					
								<?php the_content(); ?>
				                  <?php
				                    $defaults = array(
				                      'before'           => '<div id="page-links"><strong>'.esc_html__('Page','triptip').': </strong>',
				                      'after'            => '</div>',
				                      'link_before'      => '<span>',
				                      'link_after'       => '</span>',
				                      'next_or_number'   => 'number',
				                      'separator'        => ' ',
				                      'nextpagelink'     => esc_html__( 'Next page','triptip' ),
				                      'previouspagelink' => esc_html__( 'Previous page','triptip' ),
				                      'pagelink'         => '%',
				                      'echo'             => 1
				                    );
				                   ?>
				              </div>
				              <?php if ( comments_open() || get_comments_number() ) {  ?>
				                <?php comments_template(); ?>   
				            <?php } ?>
						</div>
					</div>

					<div class="col-md-4">
		                <?php get_sidebar(); ?>
		            </div>

				</div>
			</div>
		</section>
		<!-- End blog-page block -->
<?php endwhile; ?>

<?php get_footer(); ?>