posts) && have_posts()) {
while (have_posts()) : the_post();
$posts[] = $post;
endwhile;
} else if (is_array($this->posts)) {
$posts = $this->posts;
}
if (!empty($posts)) {
echo '
';
if ($this->title) {
echo '
'.$this->title.'
';
}
$ul = '
';
$i = 0;
$c = $this->items_per_row ? $this->items_per_row : getKbAmz()->getOption('ListItemsPerRow', 6);
echo $ul;
foreach ($posts as $p):
if ($i == $c) {
echo '
';
echo $ul;
$i = 0;
}
setup_postdata($p);
include dirname(__FILE__) . '/partial/product.phtml';
$i++;
endforeach;
echo '';
echo '
';
if (null === $this->pagination || $this->pagination) {
kbAmzNavigation($this->maxNumPages);
}
}