<?php
/**
 * The main template file.
 *
 * The most generic template file in a WordPress theme and one of two
 * required files for a theme (the other is style.css). It is used to
 * display a page when nothing more specific matches a query.
 *
 * When `page_for_posts` is set, this file renders the blog posts page.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package shopbar
 */

get_header();
?>

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

    <?php get_template_part( 'template-parts/page/content-search' ); ?>

<?php else : ?>

    <?php get_template_part( 'template-parts/blog/blog-listing' ); ?>

<?php endif; ?>

<?php
get_footer();
