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

get_header(); ?>
    <section class="vk-content">
        <div class="vk-banner vk-background-image-1 page-title-bg">
            <div class="vk-background-overlay"></div>
            <div class="container ">
                <div class="vk-banner-wrapper">
                    <div class="page-heading">
                        <h1 class="entry-title"><?php printf(esc_html__('Search Results for: %s', 'sparta'), '<span>' . get_search_query() . '</span>'); ?></h1>
                    </div>
                    <div class="vk-breadcrumb">
                        <?php
                        Sparta_Core::get_sparta_template('breadcrumbs');
                        ?>
                    </div><!--./vk-breadcrumb-->
                </div> <!--./vk-banner-wrapper-->
            </div>
        </div>
        <!--./vk-banner-->
        <div class="vk-page blog">
            <div class="container">
                <div class="row">
                    <?php
                    if (is_active_sidebar('sidebar-1')):
                        echo '<div class="col-lg-9">';
                    else:
                        echo '<div class="col-lg-12">';
                    endif; ?>
                    <?php
                    if (have_posts()) :

                        global $post, $wp_query;
                        /* Start the Loop */
                        while (have_posts()) : the_post();

                            get_template_part('template-parts/blog/list');

                        endwhile;

                        Sparta_Helper::sparta_paging_nav();

                    else :

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

                    endif; ?>

                </div>
                <?php
                if (is_active_sidebar('sidebar-1')):
                    echo '<div class="col-lg-3">';
                        get_sidebar();
                    echo '</div>';
                endif;
                ?>
            </div>
        </div>
        </div>
    </section>
<?php
get_footer();
