<?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 search-title">
        <div class="row">
            <div class="twelve columns">
                <h1><?php esc_html_e( 'Search results for: ', 'prime-business' ); ?><?php echo get_search_query(); ?></h1>
            </div><!-- /.twelve columns -->
        </div> <!-- /.row -->
    </div> <!-- /.container -->
    <?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', 'search' );

                        endwhile; // End of the loop.
                    ?>
                </div><!-- /.nine columns -->
                <?php get_sidebar(); ?>
            </div><!-- /.row -->
        </div><!-- /.container -->

    <?php
        else :

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

        endif;

        // Pagination
        get_template_part( 'template-parts/pagination/pagination', get_post_format() );
    ?>
</div><!-- /.ct-main-body -->

<?php
get_footer();
