WP-PostViews 1.11使用方法

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

原文链接:https://xiaohost.com/80.html,转载请注明出处。
0

评论0

请先