WP-PostViews 1.11使用方法

老牛  2012-03-15 19:23  阅读 125 views 次 评论 0 条

General Usage

Open wp-content/themes//index.php

You may place it in single.php, post.php or page.php also.

Find:

Add Anywhere Below It:

The first value you pass in is the text for views.

Default: the_views('Views');

View Stats (Outside WP Loop)

To Display Most Viewed Post

Use:

The first value you pass in is what you want to get, 'post', 'page' or 'both'.

The second value you pass in is the maximum number of post you want to get.

Default: get_most_viewed('both', 10);

To Display Most Viewed Post For A Category

Use:

The first value you pass in is the category id.

The second value you pass in is what you want to get, 'post', 'page' or 'both'.

The third value you pass in is the maximum number of post you want to get.

Default: get_most_viewed_category(1, 'both', 10);

历史上的今天:

本文地址:http://xiaohost.com/80.html
版权声明:本文为原创文章,版权归 老牛 所有,欢迎分享本文,转载请保留出处!

发表评论


表情