<?php

/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package ultimate_hotel_booking
 */

get_header();

$ultimate_hotel_booking_prefix = 'travelfic_customizer_settings_';

$ultimate_hotel_booking_sidebar = get_theme_mod($ultimate_hotel_booking_prefix.'blog_sidebar', 'none');
$ultimate_hotel_booking_disable_sidebar = get_post_meta( get_the_ID(), 'ultimate-hotel-booking-pmb-disable-sidebar', true );

if($ultimate_hotel_booking_disable_sidebar == 1){
	$ultimate_hotel_booking_content_wrap_class = 'ultimate-hotel-booking-no-sidebar';
}else{
	if( $ultimate_hotel_booking_sidebar == 'none' ){  
		$ultimate_hotel_booking_content_wrap_class = 'ultimate-hotel-booking-no-sidebar';
	} elseif($ultimate_hotel_booking_sidebar == 'left'){ 
		$ultimate_hotel_booking_content_wrap_class = 'ultimate-hotel-booking-left-sidebar';
	}elseif($ultimate_hotel_booking_sidebar == 'right'){
		$ultimate_hotel_booking_content_wrap_class = 'ultimate-hotel-booking-right-sidebar';
	}else{
		$ultimate_hotel_booking_content_wrap_class = 'ultimate-hotel-booking-right-sidebar';
	}
}



?>  

<div id="site-content" class="ultimate-hotel-booking-site-content ultimate-hotel-booking-single-page ultimate-hotel-booking-blog-archive ultimate-hotel-booking-customizer-typography">
    <div class="tf-page-header">
        <?php ultimate_hotel_booking_blog_page_banner(); ?>
    </div>

    <div class="<?php echo esc_attr( apply_filters( 'ultimate_hotel_booking_page_tftcontainer', $ultimate_hotel_booking_container = '') ); ?> <?php echo esc_attr( $ultimate_hotel_booking_content_wrap_class ); ?>">
		<?php get_template_part('template-parts/blog', 'list'); ?>
    <?php 
      if( $ultimate_hotel_booking_disable_sidebar != 1 ){
        if( $ultimate_hotel_booking_sidebar != 'none'){
          get_sidebar();						
        }
      }
    ?> 

    </div>
</div>

<?php

get_footer();