» Installation Instructions
-
Open wp-content/plugins Folder
-
Put:
File: postviews.php
-
Activate WP-PostViews Plugin
-
Refer To Usage For Further Instructions
» Upgrade Instructions
From v1.0x To v1.01
-
Open wp-content/plugins Folder
-
Overwrite:
File: postviews.php
» Usage Instructions
General Usage
-
Open wp-content/themes/<YOUR THEME NAME>/index.php
You may place it in single.php, post.php or page.php also.
-
Find:
<?php while (have_posts()) : the_post(); ?>
-
Add Anywhere Below It:
<?php if(function_exists('the_views')) { the_views(); } ?>
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:
<?php if (function_exists('get_most_viewed')): ?>
<?php get_most_viewed(); ?>
<?php endif; ?>
The first value you pass in is what you want to get, 'post', 'page' or 'both'. The second value you pass in is the number of post you want to get.
Default: get_most_viewed('both', 10);