<?php
/**
 * The template for displaying archive pages
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @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 single_term_title(); ?></h1>
                    </div>
                    <div class="vk-breadcrumb">
                        <?php
                        Sparta_Core::get_sparta_template('breadcrumbs');
                        ?>
                    </div>
                </div>
            </div>
        </div>

        <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()) :
                        /* Start the Loop */
                        global $post, $wp_query;
                        while (have_posts()) : the_post();
                            /*
                             * Include the Post-Format-specific template for the content.
                             * If you want to override this in a child theme, then include a file
                             * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                             */

                            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();
