<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wordpress-Ing &#187; 文章</title>
	<atom:link href="http://wordpress.rssbbs.com/tag/%e6%96%87%e7%ab%a0/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpress.rssbbs.com</link>
	<description>我们一起体验wordpress吧！</description>
	<lastBuildDate>Sat, 16 Jan 2010 15:58:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>wordpress调用最新文章/随机文章/最新留言</title>
		<link>http://wordpress.rssbbs.com/2008/12/16/wordpress%e8%b0%83%e7%94%a8%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e9%9a%8f%e6%9c%ba%e6%96%87%e7%ab%a0%e6%9c%80%e6%96%b0%e7%95%99%e8%a8%80/</link>
		<comments>http://wordpress.rssbbs.com/2008/12/16/wordpress%e8%b0%83%e7%94%a8%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e9%9a%8f%e6%9c%ba%e6%96%87%e7%ab%a0%e6%9c%80%e6%96%b0%e7%95%99%e8%a8%80/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 13:37:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[wordpress进阶技巧]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[文章]]></category>
		<category><![CDATA[留言]]></category>
		<category><![CDATA[调用]]></category>

		<guid isPermaLink="false">http://wordpress.rssbbs.com/?p=30</guid>
		<description><![CDATA[1. 最新文章
Wordpress最新文章的调用可以使用一行很简单的模板标签wp_get_archvies来实现. 代码如下：

&#60;?php get_archives&#40;'postbypost', 10&#41;; ?&#62; (显示10篇最新更新文章)


或者

wp_get_archives&#40;'type=postbypost&#38;limit=20&#38;format=custom'&#41;; ?&#62;

后面这个代码显示你博客中最新的20篇文章，其中format=custom这里主要用来自定义这份文章列表的显示样式。具体的参数和使用方法你可以参考官方的使用说明- wp_get_archvies。(fromat=custom也可以不要，默认以UL列表显示文章标题。)
补充: 通过WP的query_posts()函数也能调用最新文章列表， 虽然代码会比较多一点，但可以更好的控制Loop的显示，比如你可以设置是否显示摘要。具体的使用方法也可以查看官方的说明。
2. 随机文章

&#60;?php
$rand_posts = get_posts&#40;'numberposts=10&#38;orderby=rand'&#41;;
foreach&#40; $rand_posts as $post &#41; :
?&#62;
&#60;!--下面是你想自定义的Loop--&#62;
&#60;li&#62;&#60;a href=&#34;&#60;?php the_permalink&#40;&#41;; ?&#62;&#34;&#62;&#60;?php the_title&#40;&#41;; ?&#62;&#60;/a&#62;&#60;/li&#62;
&#60;?php endforeach; ?&#62;

3. 最新留言
下面是我之前在一个Wordpress主题中代到的最新留言代码，具体也记不得是哪个主题了。该代码直接调用数据库显示一份最新留言。其中LIMIT 10限制留言显示数量。绿色部份则是每条留言的输出样式。

&#60;?php
global $wpdb;
$sql = &#34;SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $wpdb-&#62;comments
LEFT OUTER JOIN $wpdb-&#62;posts ON ($wpdb-&#62;comments.comment_post_ID =
$wpdb-&#62;posts.ID)
WHERE comment_approved = '1' AND comment_type = '' [...]]]></description>
		<wfw:commentRss>http://wordpress.rssbbs.com/2008/12/16/wordpress%e8%b0%83%e7%94%a8%e6%9c%80%e6%96%b0%e6%96%87%e7%ab%a0%e9%9a%8f%e6%9c%ba%e6%96%87%e7%ab%a0%e6%9c%80%e6%96%b0%e7%95%99%e8%a8%80/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
