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

get_header();

$theme_options = omag_theme_options();

$sidebar_class = '';

if( 'left' == $theme_options['sidebar'] ) {
  $sidebar_class = 'left-sidebar';
} else {
  $sidebar_class = '';
}

?>

	<div class="container mb-view-container">

			<div class="row">



				<div class="col-lg-9 <?php echo esc_attr( $sidebar_class ); ?>" id="right">
					<div class="site">
						<div class="site-inner">

							<?php do_action( 'omag_show_breadcrumbs' ); ?>

							<!-- First type of news -->

							<div class="site-content">

		<?php if ( have_posts() ) : ?>

			<div class="article-title">
				<h3 class="page-title">
					<span>
					<?php
					/* translators: %s: search query. */
					printf( esc_html__( 'Search Results for: %s', 'omag' ), get_search_query() );
					?>
					</span>
				</h3>
			</div>

			<?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;

			the_posts_navigation();

		else :

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

		endif;
		?>

		</div>

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




				<div class="col-lg-3" id="left">
					<div class="sidebar">
						<section>

<?php
get_sidebar();
?>

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

				</div>

		</div>

<?php
get_footer();
