Code: [Select]<div class="home-container latest"> <div class="inner"> <!-- LATEST LISTINGS BLOCK --> <div id="latest" class="products grid"> <h2><?php _e('Lately added on our classifieds', 'beta'); ?></h2> <?php osc_query_item(array("category" => "4")); ?> <?php if( osc_count_custom_items() > 0) { ?> <div class="block"> <div class="prod-wrap"> <?php $c = 1; ?> <?php while( osc_has_custom_items() ) { ?> <?php bet_draw_item($c); ?> <?php $c++; ?> <?php } ?> </div> </div> <?php } else { ?> <div class="home-empty"> <img src="<?php echo osc_current_web_theme_url('images/home-empty.png'); ?>" /> <strong><?php _e('No listing in category yet', 'beta'); ?></strong> </div> <?php } ?> <?php View::newInstance()->_erase('items') ; ?> </div> </div> </div>This is very good.. Thanks MB themes.. I need a little bit more in this code. 1. How i can show only 8 custom items of selected category? (i.e i want show only 8 items of category 4.....But this query show all items in category 4<?php osc_query_item(array("category" => "4")); ?>2. How to show the latest items on top from category 4 if the number of items will be select to 8?If anybody now it... Pls tell me..
<div class="home-container latest"> <div class="inner"> <!-- LATEST LISTINGS BLOCK --> <div id="latest" class="products grid"> <h2><?php _e('Lately added on our classifieds', 'beta'); ?></h2> <?php osc_query_item(array("category" => "4")); ?> <?php if( osc_count_custom_items() > 0) { ?> <div class="block"> <div class="prod-wrap"> <?php $c = 1; ?> <?php while( osc_has_custom_items() ) { ?> <?php bet_draw_item($c); ?> <?php $c++; ?> <?php } ?> </div> </div> <?php } else { ?> <div class="home-empty"> <img src="<?php echo osc_current_web_theme_url('images/home-empty.png'); ?>" /> <strong><?php _e('No listing in category yet', 'beta'); ?></strong> </div> <?php } ?> <?php View::newInstance()->_erase('items') ; ?> </div> </div> </div>