How can I display on the main ads from different categories, each category in its block?
Here is my code, but how to edit it more correctly? What would be displayed for example ads from 1,2,3 categories...
Thank you;)
<!-- Latest Listings Block -->
<div class="home-container hc-latest">
<div class="inner">
<div id="latest" class="white">
<h2 class="home">
<?php _e('Latest listings', 'veronika'); ?>
</h2>
<?php View::newInstance()->_exportVariableToView('latestItems', veronika_random_items()); ?>
<?php if( osc_count_latest_items() > 0) { ?>
<div class="block">
<div class="wrap">
<?php
$c = 1;
while (osc_has_latest_items()) {
if (osc_item_is_premium() == 1) {continue;}
veronika_draw_item($c, 'gallery');
} ?>
</div>
</div>
<div class="home-see-all non-resp">
<a href="<?php echo osc_search_url(array('page' => 'search'));?>"><?php _e('See all offers', 'veronika'); ?></a> »
</div>
<span class="show-more-latest"><i class="fa fa-ellipsis-h"></i></span>
<?php } else { ?>
<div class="empty"><?php _e('No latest listings', 'veronika'); ?></div>
<?php } ?>
<?php View::newInstance()->_erase('items') ; ?>
</div>
</div>
</div>