<?php
/**
 * The template for displaying search results pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
 *
 * @package Buconz Starter
 */

get_header(); ?>

	<!-- Breadcrumbs -->
	<?php if(get_theme_mod('buconz_starter_search_breadcrumb', true)) : ?>
		<div class="breadcrumbs overlay">
			<div class="container">
				<div class="row">
					<div class="col-12">
						<div class="bread-inner">
							<div class="bread-title">
								<h1><?php
							/* translators: %s: search query. */
							printf( esc_html__( 'Search Results: %s', 'buconz-starter' ), '<span>' . get_search_query() . '</span>' );
							?></h1>
							</div>
							<div class="bread-menu"><?php if (function_exists('bcn_display')) bcn_display(); ?></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	<?php endif; ?>
	<!--/ End Breadcrumbs -->

	<div class="buconz-internal-area search-page section-padding">
		<div class="container">
			<div class="row">
				<div class="col-lg-8 col-12">
					<div class="buconz-page-content">
						<div class="row">
							<?php if ( have_posts() ) : ?>

								<?php
								/* Start the Loop */
								while ( have_posts() ) :
									the_post();

									/**
									 * Run the loop for the search to output the results.
									 * If you want to overload this in a child theme then include a file
									 * called content-search.php and that will be used instead.
									 */
									get_template_part( 'template-parts/content', 'search' );

								endwhile;

								else :
									get_template_part( 'template-parts/content', 'none' );

								endif;
							?>
						</div>
						<div class="row">
							<div class="col-12">
								<!-- Start Pagination -->
								<div class="pagination-main">
									<?php if (function_exists("buconz_starter_pagination"))
										{
											buconz_starter_pagination();
										}  
									?>
								</div>
								<!--/ End Pagination -->
							</div>
						</div>	
					</div>
				</div>
				<?php get_sidebar();?>
			</div>
		</div>
	</div>

<?php
get_footer();
