<li><a href="#block1"><span class="big"><?php _e('Just Listed','cp')?></span></a></li> <li><a href="#block2"><span class="big"><?php _e('A','cp')?></span></a></li> <li><a href="#block3"><span class="big"><?php _e('B','cp')?></span></a></li> <li><a href="#block4"><span class="big"><?php _e('C','cp')?></span></a></li> <li><a href="#block5"><span class="big"><?php _e('D','cp')?></span></a></li> </ul> <!-- tab 1 --> <div id="block1"> <div class="clr"></div> <div class="undertab"><span class="big"><a href="#"><?php _e('Classified Ads','cp') ?></a> / <strong><span class="colour"><?php _e('Just Listed','cp') ?></span></strong></span></div> <?php // show all ads but make sure the sticky featured ads don't show up first $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array('caller_get_posts' => 1, 'paged' => $paged,'category__not_in' => cp_get_blog_cat_ids_array(),); ?> <?php query_posts($args); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php // if(is_sticky()) continue; // don't show any sticky posts in the main section ?> <?php // if (in_category(CP_BLOG_CAT_ID) || cp_post_in_desc_cat(CP_BLOG_CAT_ID) ) continue; // don't show any blog posts ?> <div class="whiteblock can_chg_bg"> <a href="<?php the_permalink(); ?>"><?php if(get_post_meta($post->ID, 'images', true)) cp_single_image_legacy($post->ID, get_option('medium_size_w'), get_option('medium_size_h')); else cp_get_image($post->ID, 'medium', 1); ?></a> <div class="priceblockbig"> <h3><a href="<?php the_permalink(); ?>"><?php if (strlen(get_the_title()) >= 45) echo substr(get_the_title(), 0, 45).'...'; else the_title(); ?></a></h3> <p class="price"><?php if(get_post_meta($post->ID, 'price', true)) cp_get_price_legacy($post->ID); else cp_get_price($post->ID); ?></p> <div class="clr"></div> <p class="bot4px dotted"><?php _e('Category','cp') ?>: <?php the_category(', ') ?> | <?php _e('Listed','cp') ?>: <?php echo cp_ad_posted($post->post_date); ?></p> <p class="descr"><?php echo substr(strip_tags($post->post_content), 0, 200)."...";?></p> <div class="clr"></div> </div> <div class="clr"></div> </div><!-- /whiteblock --> <?php endwhile; ?> <?php if(function_exists('cp_pagination')) { cp_pagination(); } ?> <?php else: ?> <div class="whiteblock can_chg_bg"> <h3><?php _e('Sorry, no listings were found.','cp')?></h3> </div><!-- /whiteblock --> <?php endif; ?> <?php wp_reset_query(); ?> </div><!-- /block1 --> <!-- tab 2 --> <div id="block2"> <div class="clr"></div> <div class="undertab"><span class="big"><a href="#"><?php _e('Classified Ads','cp') ?></a> / <strong><span class="colour"><?php _e('A','cp') ?></span></strong></span></div> <?php // show all random ads but make sure the sticky featured ads don't show up first $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array('caller_get_posts' => 1, 'paged' => $paged, 'orderby' => rand,'category__not_in' => cp_get_blog_cat_ids_array(),'cat' => 9); ?> <?php query_posts($args); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php // if(is_sticky()) continue; // don't show any sticky posts in the main section?> <?php // if (in_category(CP_BLOG_CAT_ID) || cp_post_in_desc_cat(CP_BLOG_CAT_ID) ) continue; // don't show any blog posts ?> <div class="whiteblock can_chg_bg"> <a href="<?php the_permalink(); ?>"><?php if(get_post_meta($post->ID, 'images', true)) cp_single_image_legacy($post->ID, get_option('medium_size_w'), get_option('medium_size_h')); else cp_get_image($post->ID, 'medium', 1); ?></a> <div class="priceblockbig"> <h3><a href="<?php the_permalink(); ?>"><?php if (strlen(get_the_title()) >= 45) echo substr(get_the_title(), 0, 45).'...'; else the_title(); ?></a></h3> <p class="price"><?php if(get_post_meta($post->ID, 'price', true)) cp_get_price_legacy($post->ID); else cp_get_price($post->ID); ?></p> <div class="clr"></div> <p class="bot4px dotted"><?php _e('Category','cp') ?>: <?php the_category(', ') ?> | <?php _e('Listed','cp') ?>: <?php echo cp_ad_posted($post->post_date); ?></p> <p class="descr"><?php echo substr(strip_tags($post->post_content), 0, 200)."...";?></p> <div class="clr"></div> </div> <div class="clr"></div> </div><!-- /whiteblock --> <?php endwhile; ?> <?php if(function_exists('cp_pagination')) { cp_pagination(); } ?> <?php else: ?> <div class="whiteblock can_chg_bg"> <h3><?php _e('Sorry, no listings were found.','cp')?></h3> </div><!-- /whiteblock --> <?php endif; ?> <?php wp_reset_query(); ?> </div><!-- /block2 -->
There are currently 1 users browsing this thread. (0 members and 1 guests)