<?php
/**
 * Search Template
 *
 * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications
 * should be made in a child theme.
 *
 * @category CyberChimps Framework
 * @package  Framework
 * @since    1.0
 * @author   CyberChimps
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v3.0 (or later)
 * @link     http://www.cyberchimps.com/
 */

get_header(); ?>

	<section id="primary" class="content-area">
		<main id="main" class="site-main" role="main">
			<div class="container">
				<div class="row">
					<div class="col-md-9">
						<?php if ( have_posts() ) : ?>

							<header class="page-header">
								<h1 class="page-title">
								<?php
								/* translators: %s: search query. */
								printf( esc_html__( 'Search Results for: %s', 'compact-one' ), '<span>' . get_search_query() . '</span>' );
								?>
								</h1>
							</header><!-- .page-header -->

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

													<?php
													/**
													 * 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' );
													?>

												<?php endwhile; ?>

							<?php
							// Previous/next page navigation.
							the_posts_pagination(
								array(
									'prev_text'          => __( 'Prev', 'compact-one' ),
									'next_text'          => __( 'Next', 'compact-one' ),
									'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'compact-one' ) . ' </span>',
								)
							);
							?>


						<?php else : ?>

							<?php get_template_part( 'template-parts/content', 'none' ); ?>

						<?php endif; ?>
					</div><!-- .col-md-9 -->
					<?php get_sidebar(); ?>
				</div> <!-- .row -->
			</div>
		</main><!-- #main -->
	</section><!-- #primary -->
<?php get_footer(); ?>
