WP-PostViews 1.11使用方法

  • A+
所属分类:Wordpress

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);

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: