» Changelog
-
Version 1.40 (12-12-2008)
- NEW: Works For WordPress 2.7 Only
- NEW: Options To Display Views On Certain Places by David Potter
- NEW: Right To Left Language Support by Kambiz R. Khojasteh
- NEW: Output Of the_views() Applied To "the_views" Filter by Kambiz R. Khojasteh
- NEW: Called postviews_textdomain() In views_init() by Kambiz R. Khojasteh
- NEW: Uses plugins_url() And site_url()
- NEW: Added get_least_viewed() And get_least_viewed_category() By JBrinx
- FIXED: "views" Custom Field Gets Created Now When Post Is Published
-
Version 1.31 (16-07-2008)
- NEW: Works For WordPress 2.6
- NEW: Renamed GET Variables sortby To v_sortby And orderby To v_orderby
- NEW: Better Translation Using __ngetext() by Anna Ozeritskaya
- FIXED: Able To Use v_sortby And v_orderby in query_posts()
-
Version 1.30 (01-06-2008)
- NEW: Uses /wp-postviews/ Folder Instead Of /postviews/
- NEW: Uses wp-postviews.php Instead Of postviews.php
- NEW: Uses wp-postviews-widget.php Instead Of postviews-widget.php
- NEW: Uses number_format_i18n() Instead Of number_format()
- NEW: Option To Exclude Bots Views In 'WP-Admin -> Settings -> Post Views'
- NEW: Added Most Viewed Template
- NEW: Change The Way WP-PostViews Count Views
- NEW: Should Work With WP-Cache Or WP-SuperCache
-
Version 1.20 (01-10-2007)
- NEW: Works For WordPress 2.3 Only
- NEW: Most Viewed Widget Added
- NEW: Ability To Uninstall WP-PostViews
- NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page
-
Version 1.11 (01-06-2007)
- FIXED: Wrong URL For Page Under Most Viewed Posts Listing
-
Version 1.10 (01-02-2007)
- NEW: Works For WordPress 2.1 Only
- NEW: Localization WP-PostViews
- NEW: Added Function To Get Most Viewed Post By Category ID
- FIXED: Views Not Counting In Some Cases
-
Version 1.02 (01-10-2006)
- NEW: Change In get_most_viewed() To Accommodate Latest Version Of WP-Stats
-
Version 1.01 (01-07-2006)
- NEW: Added Get Total Views Function
- FIXED: Modified Get Most Viewed Post Function
-
Version 1.00 (01-03-2006)
» Installation Instructions
-
Open wp-content/plugins Folder
-
Put:
Folder: wp-postviews
-
Activate WP-PostViews Plugin
-
Refer To Usage For Further Instructions
» Upgrade Instructions
From v1.0x To v1.40
-
Deactivate WP-PostViews Plugin
-
Open wp-content/plugins Folder
-
Put/Overwrite:
Folder: wp-postviews
-
Delete this folder if exists:
Folder: postviews
-
Activate WP-PostViews Plugin
-
Refer To Usage For Further Instructions
» 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(); } ?>
-
Go to 'WP-Admin -> Settings -> Post Views' to configure the plugin.
View Stats (With Widgets)
-
Activate WP-PostViews Widget Plugin
-
Go to 'WP-Admin -> Appearance -> Widgets'
-
To Display Most Viewed Post
-
You can add the Most Viewed Widget by clicking on the 'Add' link besides it.
-
After adding, you can configure the Most Viewed Widget by clicking on the 'Edit' link besides it.
-
Click 'Save Changes'
View Stats (Outside WP Loop)
-
To Display Least Viewed Posts
-
Use:
<?php if (function_exists('get_least_viewed')): ?>
<ul>
<?php get_least_viewed(); ?>
</ul>
<?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 maximum number of post you want to get.
Default: get_least_viewed('both', 10);
-
To Display Most Viewed Posts
-
Use:
<?php if (function_exists('get_most_viewed')): ?>
<ul>
<?php get_most_viewed(); ?>
</ul>
<?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 maximum number of post you want to get.
Default: get_most_viewed('both', 10);
-
To Display Least Viewed Posts For A Category
-
Use:
<?php if (function_exists('get_least_viewed_category')): ?>
<ul>
<?php get_least_viewed_category(); ?>
</ul>
<?php endif; ?>
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_least_viewed_category(1, 'both', 10);
-
To Display Most Viewed Posts For A Category
-
Use:
<?php if (function_exists('get_most_viewed_category')): ?>
<ul>
<?php get_most_viewed_category(); ?>
</ul>
<?php endif; ?>
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);
-
To Sort Most/Least Viewed Posts
-
You can use:
<?php query_posts('v_sortby=views&v_orderby=desc') ?>
Or pass in the variables to the URL:
http://yoursite.com/?v_sortby=views&v_orderby=desc
You can replace desc with asc if you want the least viewed posts.