Some big blogs like Mashable and Techcrunch have a “Trending” or popular posts area in their sidebars which help direct site visitors to hot posts which in turn should help boost those posts even further. If you run a WordPress website and would like to add this to yours then there is a free plugin called WordPress Popular posts which will handle this functionality. take a look at today’s post as I show you to install and configure it.
Install The Plugin
Download the plugin and in your WordPress admin, visit “Plugins” > “Add New” > “Upload” and upload the file.
Click “Activate” under the plugin and you will see it then adds a new menu under “Settings” called “WordPress Popular Posts” visit that to start with the plugin.
The minute you install the plugin it begins recording information that it can use to display your popular posts – views and comments, if you visit the plugin configuration page under “Settings” the first thing you will see are your post stats from the last 24 hours, you can also toggle the last 7 days, 30 days and all time.
If you click the “FAQ” link at the top, you will see a page of information for customizing the output of the plugin.
The other option at the top is “Tools” if you visit this, it is a page of configuration for the plugin for things like a default thumbnail image, whether to use the plugin’s included stylesheet, open links in a new window and an option to clear the data cache.
Article continues after this block
Adding the Widget to Your Site
Now that you have seen and made any config changes, you will need to add the widget to your theme. To do this visit “Appearance” > “Widgets” and you will see the WordPress Popular posts widget, drag it to the desired position in your theme and you can begin setting the options for it.
As you will see when you open the widget, it is quite long with a lot of options to choose from. You can set the time range, default is 24 hours. Then choose the sorting option – either total views, Comments or Average daily views. For a trending widget I recommend the time range of 24 hours and total views for the sorting option. This will make it display your hottest post at the top and wont be confused by older popular posts.
As you move down the widget there is the option to display post thumbnails or not and to set their size. You can also choose what other information to display:
- Comment Count
- Page Views
- Date Format
Save your options and you can view the widget on your site. This is how it looks on the Twenty Eleven theme :
As you can see, the output is a little jumbled – you could use like that or you could do some customization to fit your theme. The theme includes its own stylesheet wpp.css so you can make your changes in there – if you want to go even further and customize the HTML output, you can also do that by checking the “Use Custom HTML Markup” box and using custom PHP code or by constructing a Shortcode using tags from the FAQ. This is all covered in the readme file included in your download :
I was very impressed with this plugin – it has great functionality and I can see it being an asset on more popular sites. I plan to add this WPLift once I have delved a bit deeper into the customization and CSS code. The plugin is nice and easy to setup and place via a widget for people not wanting to touch any code but also offers the option of more advanced display and customization for people who don’t mind delving into the code a little.
I highly recommend this plugin if you are looking to create a trending posts area on your site.