首页 » Wordpress »

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

本文标签:

相关文章推荐

转载请保留,转载自:老牛博客
原文地址 http://xiaohost.com/80.html

发表评论