$cat_posts = vce_get_category_layout(); ?> <?php $i = 0; while (have_posts()) { the_post(); $i++; ?> <?php echo vce_loop_wrap_div($cat_posts, $i, count($wp_query->posts)); ?> <?php get_template_part('sections/loops/layout-' . vce_module_layout($cat_posts, $i)); ?> <?php if ($i == count($wp_query->posts)) { ?> </div> <?php } ?> <?php } ?> <?php
if ($mod['type'] != 'blank' && have_posts()) { ?> <?php $i = 0; while (have_posts()) { the_post(); $i++; ?> <?php echo vce_loop_wrap_div($mod, $i, count($wp_query->posts)); ?> <?php get_template_part('sections/loops/layout-' . vce_module_layout($mod, $i)); ?> <?php if ($i == count($wp_query->posts)) { ?> </div> <?php } ?> <?php } ?> <?php