Words Written WordPress Plugin | ||
| May 1, 2007 | Stephen Ward | |||
|
Counting posts only gives you a partial picture of the size of your blog. After all, you may write a long post one day and a short post the next, but that doesn’t answer the real question: How much have you actually written? That’s the question my first WordPress plugin, Words Written, sets out to answer. It’s a simple script that displays the total word count of all your posts on your WordPress dashboard so that you can see how much you’ve actually written at a glance. For the sake of perspective, the plugin also outputs your total printed page count (based on an average of 400 words per page) and, for larger blogs, your total novel count (based on an average of 100,000 words per novel). Now you have hard stats to prove how much of a blogging addict you are, even to people who wouldn’t otherwise appreciate the thousands of posts you’ve written. Just tell them how big your blog is in terms of novels. If you’d like to use any of these numbers in your template, the plugin also includes the following three functions:
You can use the ID of the author you’d like to get counts for or omit it to include posts by all authors. Note that these functions don’t produce output, so be sure to use echo if you’d like to output the counts directly (i.e. < ?php echo get_words_written(); ?>). I’ll post updates to the plugin here as they become available. I’m a pretty competent PHP programmer, but this is my first plugin, so let me know if it needs any improvement by leaving a comment. I hope you enjoy it! P.S. At the time of this post, I’ve written 1.96 novels worth of posts. ChangeLogMay 2, 2007 - Fixed the table prefixes in the database queries, which had previously been hard coded and wouldn’t function with custom table prefixes. | ||||
| Comment | Bookmark | Subscribe | ||
|
On May 2, 2007, Software developer wrote the following comment: Also some function like getparawritten($author_id) to get paragraphs written ? | ||