if (isset($_GET['ajax']) && $_GET['ajax']) { while (have_posts()) { the_post(); wc_get_template_part('content', 'single-product'); } // end of the loop. } else { get_header('shop'); ?> <div class="main-container max-width center-block"> <div class="row shop-page single-product-page"> <div class="shop-area <?php echo Majale::shop_single_grid_number()['shop-single-area']; ?> "> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action('woocommerce_before_main_content'); ?> <?php while (have_posts()) {
if (is_active_sidebar('sidebar-2')) { ?> <?php dynamic_sidebar('sidebar-2'); ?> <?php } ?> </div> <?php } elseif (!(is_shop() or is_product_category() or is_product_tag()) and is_product() and Majale::shop_single_grid_number()['sidebar-2'] != 'off') { ?> <div id="sidebar-2" class="<?php echo Majale::shop_single_grid_number()['sidebar-2']; ?> sidebar-2" role="complementary"> <?php if (is_active_sidebar('sidebar-2')) { ?> <?php dynamic_sidebar('sidebar-2'); ?> <?php } ?> </div> <?php