<?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>Tomgo的生活博客 &#187; 统计代码</title>
	<atom:link href="http://www.54tomgo.com/archives/tag/%e7%bb%9f%e8%ae%a1%e4%bb%a3%e7%a0%81/feed" rel="self" type="application/rss+xml" />
	<link>http://www.54tomgo.com</link>
	<description>生活&#124;电影&#124;新闻&#124;IT话题</description>
	<lastBuildDate>Wed, 29 Jun 2011 06:41:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		
<!-- Start Of Script Generated By WP-PostViews Plus 1.1.18 -->
<script type='text/javascript' src='http://www.54tomgo.com/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery.ajax({type:'GET',url:'http://www.54tomgo.com/wp-content/plugins/wp-postviews-plus/postviews_plus.php',data:'todowppvp=&type=tag&id=76_1',cache:false,dataType:'script'});/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus 1.1.18 -->
	<item>
		<title>wordpress的统计信息代码,显示文章数、评论数、标签数等</title>
		<link>http://www.54tomgo.com/archives/264.html</link>
		<comments>http://www.54tomgo.com/archives/264.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 03:46:24 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[IT话题]]></category>
		<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress插件]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[统计代码]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=264</guid>
		<description><![CDATA[


wordpress的统计信息代码


玩Wordpress少点DIY精神都不行，原来的wordpress主题是非常简陋的。幸亏wordpress的扩展性开放性够强，插件也非常多，所以很受欢迎。刚发现原来wordpress首页连统计信息都没有。搜索了很多插件，功能太过强大，没有必要。我只要统计几个信息就够了。其他的统计，我都用第3方统计网站来完成的。比如我现在是是了51.la的统计。原来用过wp23-statistics这个插件，但是现在不支持wordpress2.8了。搜索到原来自己添加代码也可以。这里共享一下我使用的统计代码，在主题的边栏添加：
&#60;li&#62;&#60;h2&#62;&#38;raquo;　统计&#60;/h2&#62;
&#60;ul&#62;
文章数量：&#60;?php 
$count_posts = wp_count_posts();
echo $published_posts = $count_posts-&#62;publish;
?&#62;&#160; 　分类数量：&#60;?php 
echo $count_categories = wp_count_terms('category');
?&#62;
&#60;br /&#62;&#60;br /&#62;
标签数量：&#60;?php echo $count_tags = wp_count_terms('post_tag'); ?&#62;&#160; 　评论数量：&#60;?php
$count_comments = get_comment_count();
echo $count_comments['approved'];
?&#62;&#60;/ul&#62;
&#60;/li&#62;
随带推荐一下Coolcode，谢谢共享这么好的代码插件，下载地址coolcode
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_263" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-263" title="wordpress的统计信息代码" src="http://www.54tomgo.com/wp-content/uploads/2009/08/tongjixinxi.jpg" alt="wordpress的统计信息代码" width="450" height="168" /></dt>
<dd class="wp-caption-dd">wordpress的统计信息代码</dd>
</dl>
</div>
<p style="text-align: center;">玩Wordpress少点DIY精神都不行，原来的wordpress主题是非常简陋的。幸亏wordpress的扩展性开放性够强，插件也非常多，所以很受欢迎。刚发现原来wordpress首页连统计信息都没有。搜索了很多插件，功能太过强大，没有必要。我只要统计几个信息就够了。其他的统计，我都用第3方统计网站来完成的。<span id="more-264"></span>比如我现在是是了51.la的统计。原来用过wp23-statistics这个插件，但是现在不支持wordpress2.8了。搜索到原来自己添加代码也可以。这里共享一下我使用的统计代码，在主题的边栏添加：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;li&gt;&lt;h2&gt;&amp;raquo;　统计&lt;/h2&gt;</li>
<li>&lt;ul&gt;</li>
<li>文章数量：&lt;?php </li>
<li>$count_posts = wp_count_posts();</li>
<li>echo $published_posts = $count_posts-&gt;publish;</li>
<li>?&gt;&nbsp; 　分类数量：&lt;?php </li>
<li>echo $count_categories = wp_count_terms('category');</li>
<li>?&gt;</li>
<li>&lt;br /&gt;&lt;br /&gt;</li>
<li>标签数量：&lt;?php echo $count_tags = wp_count_terms('post_tag'); ?&gt;&nbsp; 　评论数量：&lt;?php</li>
<li>$count_comments = get_comment_count();</li>
<li>echo $count_comments['approved'];</li>
<li>?&gt;&lt;/ul&gt;</li>
<li>&lt;/li&gt;</li></ol></div>
<p>随带推荐一下Coolcode，谢谢共享这么好的代码插件，下载地址<a href="http://download.coolcode.cn/coolcode.zip">coolcode</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/264.html/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

