<?php
/**
 * The template for displaying all WooCommerce pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site may use a
 * different template.
 *
 * @link    https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package wpstream-theme
 */

get_header();

if ( 
	is_tax('product_cat') || 
	is_tax('product_tag') || 
	is_tax('wpstream_actors') || 
	is_tax('wpstream_category')  || 
	is_tax('wpstream_movie_rating')  || 
	is_tax('post_tag' ) ) {

    // Use the archive.php template for product categories, tags, and custom taxonomies


    include(get_template_directory() . '/archive.php');
} else {
?>
    <div id="content" class="site-content <?php echo esc_attr( wpstream_theme_container_class() ); ?> py-5 mt-4">
        <div id="primary" class="content-area">

            <!-- Hook to add something nice -->
            <?php wpstream_bs_after_primary(); ?>

            <main id="main" class="site-main">

                <!-- Breadcrumb -->
                <?php woocommerce_breadcrumb(); ?>

                <div class="row">
                    <div class="col">
                        <?php woocommerce_content(); ?>
                    </div>

                    <!-- sidebar -->
                    <?php get_sidebar(); ?>

                    <!-- row -->
                </div>
                <!-- #main -->
            </main>
            <!-- #primary -->
        </div>
        <!-- #content -->
    </div>
<?php
}
get_footer();
?>
