This is the first Wordpress plugin I have ever made, let alone released for download, so please, be gentle. I needed a plugin for my blog to count the total comments for each month to determine each month’s Comment Love donation. I looked high and low for a plugin to do just that, but I was unable to find one. I then decided I might as well make it myself as it really was not much of a feat in the first place.
The plugin is very basic - the function takes in two parameters, the year and the month you want the comments from. If either fields are left blank, it will default to the current month.
If you want the current month’s comment total, all you need to do is call the function without any parameters.
<?php monthCommentCount(); ?>
If you want a specific month, just put in the year and the month in question like below:
<?php monthCommentCount(2006, 3)); ?>
The function prints the total number of comments - nothing more, nothing less. I may be making some additional plugins along this genre, so there could be additional downloads available. Until then, enjoy this particular plugin if it is of any use to you.
Download & Instructions
Download Month Comment Count Plugin
- Right-click/Command-click on the link above and rename the extension from ‘phps’ to ‘php’.
- Upload the file to the ‘plugins’ directory within your ‘wp-content’ directory.
- Activate the plugin from the ‘Plugins’ section of your Wordpress admin area.
- Use the code examples above as reference for use.
- Show off how many more comments you get per month than me.
Enjoy.