<?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">
                        <?php the_archive_title('<h1 class="entry-title">', '</h1>'); ?>
                    </div>
                    <div class="vk-breadcrumb">
                        <?php
                        Sparta_Core::get_sparta_template('breadcrumbs');
                        ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="vk-page sparta-event-page">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <?php
                        if (have_posts()) :

                            if (!is_single()) {
                                echo '<div class="row">';
                            } else {
                                echo '<div class="evnet-page-detail">';
                            }

                            /* Start the Loop */
                            while (have_posts()) : the_post();

                                get_template_part('template-parts/content', 'event');
                            endwhile;
                        ?>
                    </div>
                    <?php
                        the_posts_pagination(array(
                            'screen_reader_text' => '',
                            'prev_text' => wp_kses('<i class="fa fa-chevron-' . (is_rtl() ? 'right' : 'left') . '"></i>', array('i' => array('class' => array()))),
                            'next_text' => wp_kses('<i class="fa fa-chevron-' . (is_rtl() ? 'left' : 'right') . '"></i>', array('i' => array('class' => array()))),
                            'before_page_number' => '',
                        ));
                    else :
                        get_template_part('template-parts/content', 'none');
                    endif; ?>
                </div>

            </div>
        </div>
        </div>
    </section>
<?php
get_footer();
