<?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>一杯茶 &#187; 代码</title>
	<atom:link href="http://cha.xuexibbs.com/tag/%e4%bb%a3%e7%a0%81/feed" rel="self" type="application/rss+xml" />
	<link>http://cha.xuexibbs.com</link>
	<description>记录生活点滴，品味人生百味，经验分享，知识学习</description>
	<lastBuildDate>Sun, 05 Feb 2012 11:34:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=11</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>wordpress最新评论的调用代码</title>
		<link>http://cha.xuexibbs.com/210.html</link>
		<comments>http://cha.xuexibbs.com/210.html#comments</comments>
		<pubDate>Mon, 03 Nov 2008 09:30:29 +0000</pubDate>
		<dc:creator>茶大哥</dc:creator>
				<category><![CDATA[网站建设]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://cha.xuexibbs.com/?p=210</guid>
		<description><![CDATA[如何写最新评论的调用代码?
wordpress最新评论的调用代码
&#60;h2&#62;最新评论&#60;/h2&#62;
&#60;?php
global $wpdb;
$sql = &#8220;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,15) 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 = &#8216;1&#8242; AND comment_type = &#8221; AND
post_password = &#8221;
ORDER BY comment_date_gmt DESC
LIMIT 15&#8243;;
$comments = $wpdb-&#62;get_results($sql);
$output = $pre_HTML;
$output .= &#8220;\n&#60;ul&#62;&#8221;;
foreach ($comments as $comment) {
$output .= &#8220;\n&#60;li&#62;&#8221; . &#8220;&#60;a href=\&#8221;" . get_permalink($comment-&#62;ID) .
&#8220;#comment-&#8221; . $comment-&#62;comment_ID [...]]]></description>
		<wfw:commentRss>http://cha.xuexibbs.com/210.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>wordpress最多评论的代码</title>
		<link>http://cha.xuexibbs.com/207.html</link>
		<comments>http://cha.xuexibbs.com/207.html#comments</comments>
		<pubDate>Mon, 03 Nov 2008 09:27:28 +0000</pubDate>
		<dc:creator>茶大哥</dc:creator>
				<category><![CDATA[网站建设]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://cha.xuexibbs.com/?p=207</guid>
		<description><![CDATA[wordpress最多评论的代码
&#60;div id=&#8221;mostcommented&#8221; class=&#8221;clearfloat&#8221;&#62;
&#60;h3&#62;Most Commented&#60;/h3&#62;
&#60;ul&#62;&#60;?php $result = $wpdb-&#62;get_results(&#8221;
SELECT comment_count,ID,post_title
FROM $wpdb-&#62;posts
ORDER BY comment_count DESC
LIMIT 0 , 5&#8243;);
foreach ($result as $topfive) {
$postid = $topfive-&#62;ID;
$title = $topfive-&#62;post_title;
$commentcount = $topfive-&#62;comment_count;
if ($commentcount != 0) { ?&#62;&#60;li&#62;&#60;a href=&#8221;&#60;?php echo get_permalink($postid); ?&#62;&#8221; title=&#8221;&#60;?php echo $title ?&#62;&#8221;&#62;&#60;?php echo $title ?&#62;&#60;/a&#62;&#60;/li&#62;&#60;?php } } ?&#62;
&#60;/ul&#62;
&#60;?php /* Widgetized sidebar, if you have the plugin installed. */ if [...]]]></description>
		<wfw:commentRss>http://cha.xuexibbs.com/207.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>调用wordpress最新日志的代码</title>
		<link>http://cha.xuexibbs.com/205.html</link>
		<comments>http://cha.xuexibbs.com/205.html#comments</comments>
		<pubDate>Mon, 03 Nov 2008 09:23:06 +0000</pubDate>
		<dc:creator>茶大哥</dc:creator>
				<category><![CDATA[网站建设]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://cha.xuexibbs.com/?p=205</guid>
		<description><![CDATA[很多人想在自己的博客上显示最新的日志，可以通过一些很复杂的函数或者插件等等。但是今天向你介绍一个最简单的方法，通过 WordPress 内置的一个函数就可以实现。
wordpress调用最新文章函数如下：
最新文章代码:
&#60;?php query_posts(&#8217;showposts=10&#8242;); ?&#62;&#60;?php if (have_posts()) : while (have_posts()) : the_post(); ?&#62;&#60;li&#62;&#60;a href=&#8221;&#60;?php the_permalink() ?&#62;&#8221;&#62;&#60;?php the_title() ?&#62;&#60;/a&#62;&#60;/li&#62;
showpost=10 控制的是 显示数目 比如你还可以改成 5 等等
]]></description>
		<wfw:commentRss>http://cha.xuexibbs.com/205.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

