WORDPRESS分类页调用点阅详细代码参考

老大做了好几个测试,终于把手动闸阀分类页调用点阅详细代码如下:

<?php
    if (is_paged()) $is_paged = true;
   
     $featposts = get_option('woo_show_carousel'); // Number of featured entries to be shown
     $ex_feat = "-" . get_cat_id(get_option('woo_featured_category'));
    
     $showvideo = get_option('woo_show_video');
     $ex_vid = "-" . get_cat_id(get_option('woo_video_category'));
    
     if($featposts == "true"){ $exclude[] = $ex_feat;}
     if($showvideo == "true"){ $exclude[] = $ex_vid; }
     if(!empty($exclude)){
        $ex = implode(',',$exclude);
     }
         
     $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=$ex&paged=$paged");
     $args = array(
                'showposts' => 5,
                'post__in'  => array(1,34,47)
            );
            query_posts($args);
  if (have_posts()) : $counter = 0;
  while (have_posts()) : the_post(); $counter++;?>


 <div class="post <?php if ($counter == 1) { echo 'fl'; } else { echo 'fr'; $counter = 0; } ?>">
           
      <div class="box-post-content">
   <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
   <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p>
            </div>
   <p><span class="continue"><a href="<?php the_permalink() ?>">点阅详细</a></span></p>
           
  
        <p class="posted">类属: <?php the_category(', ') ?><span class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></span></p>
  </div><!--/post-->
  
  <?php if ( $counter == 0 ) { echo '<div class="hl-full"></div>'; ?> <div style="clear:both;"></div> <?php } ?>
 
 <?php endwhile; ?>
    <?php endif; ?>

做个简单记录,希望以后还能用得上,也希望对其他人有些大田阀门手动闸阀产品中心帮助!!!

手动闸阀相关:闸北鲜花/奉贤保洁公司/静安租车/上海汽车租赁/松江婚庆礼仪/拉力机/喷码机/自吸泵/隔膜阀/槽型混合机/螺钉/冷水机/注册公司/装修公司/空调维修/代开发票

posted @ 2011-10-22 12:20  蓝色的天空下  阅读(339)  评论(0编辑  收藏  举报
google