WORDPRESS分类页调用点阅详细代码参考
2011-10-22 12:20
155 查看
老大做了好几个测试,终于把手动闸阀分类页调用点阅详细代码如下:
<?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; ?>
做个简单记录,希望以后还能用得上,也希望对其他人有些大田阀门手动闸阀产品中心帮助!!!
手动闸阀相关:闸北鲜花/奉贤保洁公司/静安租车/上海汽车租赁/松江婚庆礼仪/拉力机/喷码机/自吸泵/隔膜阀/槽型混合机/螺钉/冷水机/注册公司/装修公司/空调维修/代开发票
<?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; ?>
做个简单记录,希望以后还能用得上,也希望对其他人有些大田阀门手动闸阀产品中心帮助!!!
手动闸阀相关:闸北鲜花/奉贤保洁公司/静安租车/上海汽车租赁/松江婚庆礼仪/拉力机/喷码机/自吸泵/隔膜阀/槽型混合机/螺钉/冷水机/注册公司/装修公司/空调维修/代开发票
相关文章推荐
- C++ STL标准模板库类String成员详细列表参考及示例代码
- jQuery UI Dialog 创建友好的弹出对话框实现代码 详细出处参考:http://www.jb51.net/article/30087.htm
- 设为首页加入收藏兼容360/火狐/谷歌/IE等主流浏览器的代码 详细出处参考:http://www.jb51.net/article/35063.htm
- jQuery Ajax方法调用 Asp.Net WebService、WebMethod 的详细实例代码
- 【iOS-cocos2d-X 游戏开发之十三】详细讲解在Xcode中利用预编译并通过Jni调用Android的Java层代码(cocos2dx里访问调用Android函数)!
- 这是一个小小的打地鼠游戏,里面有详细的步骤(在参考了一些资料的情况下,写的代码)
- 在vb和asp中调用c#生成的.net的dll,详细步骤、截图和代码
- win10环境下VTK7.1的编译和Qt调用VTK的详细教程(本文链接含VTK库和测试代码的分享)
- H.264参考软件JM12.2RC代码详细流程
- ecshop商品详细描述调用商品相册代码
- JNA:JAVA调用DLL 超详细代码实战
- C#调用google earth 参考代码4
- jQuery Ajax方法调用 Asp.Net WebService 的详细实例代码
- Javascript 链式调用实现代码(参考jquery)
- C#调用google earth 参考代码2
- C4.5决策树代码详细解析以及C4.5程序调用(正确的代码!!!)
- python 图片验证码代码分享 详细出处参考:http://www.jb51.net/article/30731.htm
- jQuery Ajax方法调用 Asp.Net WebService 的详细实例代码
- 复制文章时自动在文章末尾加上来源网址的代码本文来自: http://www.cnblogs.com/wifi 详细来源请参考:http://www.cnblogs.com/wifi/archive/2012/04/24/2468097.html
- H.264参考软件JM12.2RC代码详细流程