<?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://codex.wordpress.org/Template_Hierarchy
 *
 * @package bestel
 */
get_header(); ?>
	<?php get_template_part( 'wp-hotel-booking/search/search-form-page' ); ?>
	<div class="section">
		<div class="container">
			<div class="title-wrap text-center">
				<h1><?php echo wp_kses_post( esc_html__( 'Special Offers', 'bestel' ) ); ?></h1>
				<div class="h-decor"></div>
			</div>
			<div class="row special-grid">
				<?php
					query_posts(
						array(
							'post_type'      => array( 'our-offers' ),
							'posts_per_page' => bestel_get_option( 'bestel_offer_per_page' ),
						)
					);
					if ( have_posts() ) :
						while ( have_posts() ) :
							the_post();
							get_template_part( 'template-parts/content', 'offer' );
						endwhile;
						else :
							get_template_part( 'template-parts/content', 'none' );
						endif;
						?>
				<?php
					the_posts_pagination(
						array(
							'prev_text'          => esc_html__( '&laquo; Previous', 'bestel' ),
							'next_text'          => esc_html__( 'Next &raquo;', 'bestel' ),
							'before_page_number' => '',
							'screen_reader_text' => ' ',
						)
					);
					?>
			</div>
		</div>
	</div>
<?php get_footer(); ?>
