<?php
/**
 * The template for displaying archive pages.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 */

get_header();
?>

<div class="ct-main-body">
    <?php if ( have_posts() ) : ?>
    <div class="container archive-title">
    	<div class="row">
    		<div class="twelve columns">
                <header class="page-header">
                    <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
                </header><!-- .page-header -->
            </div><!-- /.twelve columns -->
    	</div>
    </div>
    <?php endif; ?>

    <?php
        if ( have_posts() ) :
    ?>

        <div class="container loop-container">
            <div class="row">
                <div class="nine columns">
                    <?php
                        while ( have_posts() ) : the_post();

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

                        endwhile; // End of the loop.

                        // Pagination
                        get_template_part( 'template-parts/pagination/pagination', get_post_format() );
                    ?>
                </div><!-- /.nine columns -->
                <?php get_sidebar(); ?>
            </div><!-- /.row -->
        </div><!-- /.container -->

    <?php
        else :

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

		endif;
	?>
</div><!-- /.ct-main-body -->

<?php
// Pagination
get_template_part( 'template-parts/pagination/pagination', get_post_format() );

get_footer();
