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

get_header(); ?>

<div id="content" class="site-content">
<div class="container">
	<div class="row">
		<div class="col-md-12">
	
			<main id="main" class="site-main">
				<?php get_template_part( 'template-parts/sidebars/sidebar', 'breadcrumbs' ); ?>
			<header class="page-header">
				<?php if ( have_posts() ) : ?>
					<h1 class="page-title"><?php // translators: %s: search term
					printf( esc_html__( 'Search Results for: %s', 'equable-lite' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
				<?php else : ?>
					<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'equable-lite' ); ?></h1>
				<?php endif; ?>
			</header>

				<?php
				if ( have_posts() ) :
					while ( have_posts() ) : the_post();
						get_template_part( 'template-parts/post/content', 'search' );
					endwhile;
					get_template_part( 'template-parts/navigation/navigation', 'blog' );
				else : ?>

					<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'equable-lite' ); ?></p>
					<?php
						get_search_form();
				endif;
				?>
			</main>

		</div>
	</div>
</div>

<?php
get_footer();
