<?php
/**
 * The template for displaying search results pages
 *
 * @package Poster
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

get_header();

$container = get_theme_mod( 'poster_container_type' );
$postsstyle = get_theme_mod( 'poster_posts_layout', 'poster');

?>
<div class="wrapper" id="search-wrapper">

	<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">

		<div class="row">

			<?php
			// Do the left sidebar check and open div#primary.
			get_template_part( 'global-templates/left-sidebar-check' );
			?>
			<main class="site-main" id="main">
			<?php 
				if (is_active_sidebar('serach-before-posts')) {
					dynamic_sidebar('serach-before-posts');
				} ?>			
				<?php get_template_part( 'loop-templates/posts/posts', $postsstyle ); ?>
			</main>
			<?php
			// Display the pagination component.
			poster_pagination();

			// Do the right sidebar check and close div#primary.
			get_template_part( 'global-templates/right-sidebar-check' );
			?>

		</div><!-- .row -->

	</div><!-- #content -->

</div><!-- #search-wrapper -->

<?php
get_footer();
