八 29
1. 如何在显示时排除特定分类
Advanced Category Excluder- 这个插件的主要目的是通过在特定页面(如:搜索结果页,RSS源列表,分类列表或者入口页面)隐藏特定分类来增强Wordpress的功能.
- <?php if ( have_posts() ) : query_posts($query_string .'&cat=-13,-26'); while ( have_posts() ) : the_post(); ?>
2. 如何显示一个分类的所有文章
如果你想显示一个分类下的特定的文章(像我用在Devsnippets的新闻区域那样)
- <ul class="news">
- <?php query_posts('cat=6&showposts=5'); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
本文为最常用的11个wordpress技巧之一
原文地址:http://www.noupe.com/wordpress/most-desired-wordpress-hacks-11-common-requests-and-fixes.html

相关日志
2 Pings to “wordpress文章&分类相关技巧”
9 Responses to “wordpress文章&分类相关技巧”
-
1. Yacca Says:
八月 29th, 2008 at 11:38对滴,你说滴是对滴 哈~我首页的固顶即用php query_posts(’cat=6&showposts=5′); 实现
-
2. nobug Says:
八月 30th, 2008 at 10:30我不管这些,搞好之后就开写,有了新的需求再去寻找解决方法=。=
-
3. 一个大妈 Says:
八月 31st, 2008 at 17:31真是个技术人儿,俺们可不懂这些….
-
4. 锐风 Says:
九月 2nd, 2008 at 08:35貌似以前看过这篇文章啊..
-
5. paran Says:
九月 15th, 2008 at 17:17不错。
-
6. 技术资料 Says:
十一月 16th, 2008 at 05:47文章不错啊,继续加点好的文章来看看。看完了给你顶几下。(*^__^*) 嘻嘻…
九月 1st, 2008 at 10:45
[...] from:wordpress文章&分类相关技巧 by:怒风的博客 [...]
二月 8th, 2009 at 00:02
[...] wordpress文章&分类相关技巧 [...]