<?php /** * Partial template used for looping through query results. * * @author Themedelight * @package Themedelight/AdventureTours * @version 1.0.0 */ if (have_posts()) { while (have_posts()) { the_post(); $postType = get_post_type(); switch ($postType) { case 'post': get_template_part('content', get_post_format()); break; case 'product': wc_get_template_part('content-product', get_post_format()); break; default: get_template_part('content', $postType); break; } } if (!is_single()) { adventure_tours_render_pagination(); } } else { get_template_part('content', 'none'); }
} else { $categories_col_size = $sidebar_content ? 2 : 3; } adventure_tours_di('register')->setVar('tour_cat_columns', apply_filters('adventure_tours_tour_categories_columns', $categories_col_size, $sidebar_content ? true : false)); adventure_tours_render_tour_categories(array('before' => '<div class="row product-rategories">', 'after' => '</div>')); } ?> <?php if ($need_show_tours) { if ('grid' == $tours_display_style) { get_template_part('templates/tour/loop-grid'); } else { get_template_part('templates/tour/loop-list'); } adventure_tours_render_pagination('<div class="margin-top">', '</div>'); } ?> <?php } elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) { ?> <?php wc_get_template('loop/no-products-found.php'); ?> <?php } $primary_content = ob_get_clean(); ?> <?php adventure_tours_render_template_part('templates/layout', '', array('content' => $primary_content, 'sidebar' => $sidebar_content));