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

get_header();
?>

<!--Blog Area Start-->
<div class="blog-page-area area-padding">
    <div class="container">
        <div class="row">
            <div class="blog-grid home-blog">

				<?php
				if (is_home()) {
					if(get_theme_mod('blogpage_sidebar')=='1' ){?>
						<div class="col-md-8 col-sm-8 col-xs-12">
					<?php
					}else{?>
						<div class="col-md-12 col-sm-12 col-xs-12">
					<?php }
				}else{
				?>
					<div class="col-md-8 col-sm-8 col-xs-12">
				<?php }?>

	                <?php
	                if ( have_posts() ){
	                    /* 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' );
	                    }
	                    ?>
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="blog-pagination">
								<?php the_posts_pagination();?>
							</div>
						</div>
	                    <?php
	                }else{
	                    get_template_part( 'template-parts/content', 'none' );
	                }
	                ?>
	                
            	</div>
				<?php
				if (is_home()) {
					if(get_theme_mod('blogpage_sidebar')=='1' ){?>
					<div class="col-md-4 col-sm-4 col-xs-12">
						<?php get_sidebar();?>
					</div>
				<?php
					}
				}else{
				?>
					<div class="col-md-4 col-sm-4 col-xs-12">
						<?php get_sidebar();?>
					</div>
				<?php }?>
            	
            </div>
        </div>
        <!-- End row -->
    </div>
</div>
<!--End of Blog Area-->


<?php
get_footer();
