Posts

Showing posts from July, 2010

Thumbnails for WordPress.com Popular Posts

While working on the Latest Gadgets review blog I installed a plugin called WordPress.com Popular Posts which uses stats collected from your blog to work out the most frequently viewed stories during a time frame of your choice. The installation is very easy and customizing the plugin can be done via the widgets page. However I felt it was missing something: thumbnails!

On the site I was working on we use the first image in a post as the source image for our thumbnails and use the timthumb.php function to dynamically resize them. I found this blog posting which described how to create thumbnails for an alternative "popular posts" plugin. With a bit of hacking at the code provided there I was able to get thumbnails for the WordPress.com Popular Posts plugin.

So, with thanks to the aforementioned blog, here is a record of what I did for future reference (and for the benefit of anyone searching for a similar solution).

You need to download and install timthumb.php if your theme…