I’m working on a revamp to the blog, and in my search for excellence I was unable to find a widget to display a link to the most popular posts according to the number of comments — something I want to add to “wesg 2.0”.
After finding an excellent tutorial on creating WP widget admin panels, I decided to make my own to have complete control.
The result of my labour is a very simple widget that displays a link to the pages with the most number of comments. You can customize the title of the widget, the number of posts to display and comment count.
You can also limit or skip single categories.
- Ricky — MySQL query to exclude posts with multiple categories
- Ashish J. — Hindi translation and beta test
- Branco — Slovak translation
- Upload the file most-popular.php to your WordPress plugins folder.
- Activate the plugin from the admin panel.
- Go to the Widget admin page and customize the widget.
If you’d like to help improve development of this plugin and others that I have written, you can donate with PayPal.
Current usage is limited to widget only. Keep watching this to see if the template function returns.
- Title: Most Popular
- Show links to 5 posts
- Display comment count
- Posts with zero comments are included
- All categories are included
- No categories are excluded
v1.0 — August 14, 2008
* Initial release
v1.1 — August 21, 2008
* Added support for using the list as a function in a post
v1.2 — January 6, 2009
* Updated for WordPress 2.7
* Add localization capability
v1.3 — July 18, 2009
* Added categories to exclude
* Added categories to include
* Switch off nonzero comment posts
v1.4 — August 6, 2009
* Added exclude category checkbox
* Added include category checkbox
* Stopped drafts from including
v1.4.1 — August 10, 2009
* Exclude posts with multiple categories
v1.4.2 — October 24, 2009
* Added support for custom CSS classes to match website theme
v1.4.3 — November 21, 2009
* Added ability to limit comments to posts within a certain timeframe
v1.5 — July 11, 2010
* Updated for WP3.0 compatibility and conventions
* Added reverse order option
v1.6 — July 18, 2010
* Repaired category and date behaviour
v1.6.1 — September 23, 2012
* Applied bugfixes for WordPress API updates
v1.6.2 — February 13, 2013
* Added Slovak translation
Something you want changed about it? Please leave a comment.