This is a simple popular posts WordPress widget for your blog. The popularity formula for this widget is solely based only on the number of comments for each post. The most popular post is the post which has the most comments. I add a time interval parameter to specify when the posts are considered popular. With this addition, you can specify a range when the posts are considered popular. You can specify arbitrary number of weeks, months, and years back from the current date as the time interval parameter. You can also choose all-time popular posts, ignoring the time interval parameter.
The following image shows the appearance of this Ranged Popular Posts widget in my Indonesian WordPress blog (suhanto.com):
And the following images shows the setting of this widget in administration screen:
As you can see from the administration screen, you can tweak the widget to display certain number of popular posts. You can specify posts interval to be included as popular posts. You also can display the number of comments for each post. This little flexibility should be enough for a simple popular posts WordPress widget.
If you already knew how to install WordPress plugin (widget), the installation process of this widget is not different from other WordPress plugins.
First please download this plugin http://wordpress.org/extend/plugins/ranged-popular-posts/. Then, extract the
ranged-popular-posts-1.1.zip into your
plugins directory. Next step, you have to activate the plugin via admin plugin screen. After activating the Ranged Popular Posts widget should be available in your widget collection. You can drag and drop it to the sidebar and place it as you like.
This section covers the description of parameters used by this widget.
This is the title of widget, in plain text. You can put any value here. For example: Popular Posts, Popular Posts (Trailing 1 Year), Most Commented Posts, etc.
- Posts Interval
This is the time-range when the posts are included in popularity calculation. This parameter is a combination of a number and a range-type. You can put arbitrary ‘reasonable’ number here. The range-type value is provided and can be chosen from a dropdownlist. Currently available range-types are all-time, year(s), month(s), and week(s). For example if you put 1 as number, and choose year(s) as range-type, the popular posts will be calculated only from the trailing 1 year postings.
- Number of Posts to Display
You can specify how many posts to display in this widget. For example if you put 10, then only the most 10 popular posts will be displayed in the widget.
- Show Number of Comments
The number of comments for each post will be displayed if this option is turned on. Otherwise, it will be hidden.