z-blog是自带有文章计数功能的,而wordpress目前版本(版本2.9.1)还没有该功能。不过这都不影响wordpress的使用,因为它有着强大的插件支撑着,这里我就介绍一款wordpress文章计数插件WP-PostViews,我的原则是一种功能的插件不会介绍多款的,一款就够了,免得用户因为选择而烦恼。
WP-PostViews插件的安装
安装很简单,和其它插件一样,在后台“插件”—“添加新插件”再搜索“WP-PostViews”插件,点安装即可。
WP-PostViews插件的使用方法
和其它傻瓜式插件不一样,WP-PostViews需要在页面做适当的代码添加。
1.页面使用
下载安装插件之后,在blog中你想要展现统计数的地方插入以下代码即可。
1 | <?php if(function_exists('the_views')) {the_views();} ?> |
2.widget使用
对于支持widget的wordpress的主题来说,激活WP-PostViews Widget之后,拖拽到侧边栏合适的位置即可,对于不知道widget的主题,使用以下语言进行调用。
1 2 3 | <?php if (function_exists('get_most_viewed')): ?> <?php get_most_viewed(); ?> <?php endif; ?> |
WP-PostViews插件的设置
WP-PostViews的可以设置对某些用户访问统计,也可以设置统计显示形式,比如%VIEW_COUNT% views(将显示成222 views),%VIEW_COUNT%为计数值。如果你想显示格式为“阅读次数 222”,可以设置为 阅读次数 %VIEW_COUNT%

还有WP-PostViews计数结果可以只对某些用户显示,如果你不想让游客看到统计数据,则可以选择“Display to registered users only”属性。

沙发,我也是用这个插件统计的
[回复]
好用吗?
[回复]
我早早地就启用了这款插件了,因为这是“热门博文”的前提。
[回复]
一直是用ZBLOG!嘿嘿,WP不会
[回复]
一朋友也写了一篇这样的文章 不妨去看看 http://www.stuseo.com/index.php/wp-postviews-installation-guide
[回复]
感謝分享,這是偉大的!
[回复]
I haven¡¦t checked in here for a while since I thought it was getting boring, but the last few posts are good quality so I guess I will add you back to my daily bloglist. You deserve it my friend
[回复]
I have to point out that on the whole I am fairly taken with this website. It is very clear that you understand your subject matter and that you’re passionate about it. I wish I had your talent to blog. I’ve saved as a favorite your web-site and look ahead to more posts.
[回复]
I’m really enjoying the theme/design of your web site. Do you ever run into any browser compatibility issues? A few of my blog visitors have complained about my site not operating correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this issue?
[回复]
Excellent post however , I was wondering if you could write a litte more on this topic? I’d be very thankful if you could elaborate a little bit more. Kudos!
[回复]
Have you ever thought about creating an e-book or guest authoring on other websites? I have a blog centered on the same information you discuss and would really like to have you share some stories/information. I know my viewers would enjoy your work. If you are even remotely interested, feel free to send me an e mail.
[回复]
Hey just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Opera. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d post to let you know. The style and design look great though! Hope you get the issue fixed soon. Cheers
[回复]