A few years ago, I wrote a simple PHP script for counting post views. It was originally created to use alongside one of the themes I was involved in creating.
Unfortunately, I made the mistake of adding it to the Hybrid Core framework. If you follow any of my blog posts on development philosophy, you probably know that I am adamant about keeping this sort of thing out of themes and inside of plugins. We all make mistakes along the way though. Today, I’m happy to announce that I’ve fixed this particular mistake.
Without further ado, I give you the Entry Views plugin.
About the plugin
Entry Views has always been a simple script for counting post views. It just had a simple function (template tag) for outputting the count. Now that it’s in plugin form, I can really beef it up and do a lot more fun stuff with it. For example, this first version of the plugin comes with a widget for listing posts by view count. I also have a few other features in mind for future versions.
By default, the plugin counts views for the following post types:
- Portfolio Item – Custom Content Portfolio Plugin
- Restaurant Item – Restaurant Plugin
- Recipe – Upcoming recipe plugin
- Literature – Upcoming literature/writing plugin
I’ll also be happy to include post types for any other plugin requested. I just need to know the post type name or the plugin.
Adding support for the plugin should be simple for theme authors. I’m more than willing to help y’all in the forums if you need the help adding it. The Stargazer theme will be getting support in its next update if you want to see an example.
Note that Entry Views will no longer be a part of the Hybrid Core framework in the upcoming 2.0 version. So, any theme authors using it should move over to supporting the plugin instead.
Get the plugin
I hope you enjoy this release and hope to see this integrated into some themes. You can download the plugin from the following pages: