I’ve mentioned before that there are a lot of crucial WordPress plugins that all blogs should use; however, this one I’m going to talk about is not one of them. Instead, this plugin is a great plugin for certain types of blogs that have several anchor posts that are their claim to fame.

This plugin is called Popularity Contest, and what is does it automatically monitor the traffic on your blog and displays a designated number of your most popular posts. This helps funnel new readers to the best and most popular work in the hopes of retaining them as a feed subscriber. It also has the additional benefit of showing a permanent link on every page of your blog’s sidebar, which will send a little search engine link juice to these posts and help emphasize them with search engine spiders.

How do I set up this plugin? As with most plugins that involves the sidebar, you will have to manually insert some code in order to get it working properly. Once you’ve uploaded and activated Popularity Contest like normal, you’ll find that this plugin is pretty easy to set up. You’ll want to determine where you want your popular posts to be displayed in your sidebar and paste the following code:

<?php if (( (is_home()) or (is_single()) or (is_page()) or (is_search() or (is_404()) or ($notfound == '1'))) && (function_exists('akpc_most_popular'))) { ?>
<h2>My Popular Posts</h2>
<ul><?php akpc_most_popular(); ?></ul> <?php } ?>
<?php if ((is_archive() && is_month()) && (function_exists('akpc_most_popular_in_month'))) { ?>
<h2>Most Popular Posts of <?php the_time('F Y'); ?></h2>
<ul><?php akpc_most_popular_in_month(); ?></ul> <?php } ?>
<?php if ((is_category()) && (function_exists('akpc_most_popular_in_cat'))) { ?>
<h2>Most Popular Posts in '<?php single_cat_title(); ?>'</h2>
<ul><?php akpc_most_popular_in_cat(); ?></ul>
<?php } ?>

If you use this code above, it will not only display your most popular posts in your sidebar, but it will actually add your individual categories most popular posts to that particular category, and display the most popular archive posts within your individual monthly archives. This will help improve navigation for readers digging through your blog’s categories and archives, in addition to your main pages.

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Follow Kyle on Twitter @KyleEslick!

  1. Jo says:

    I’m not sure how to work with the sidebar part..

    I found this code in Options > Popularity

    Most Popular Posts

    Do I insert it inside a text box in “Widgets” or in the sidebar.php under “Theme Editor”?

    I tried putting it in widgets but there’s nothing under Most Popular Posts. If it’s in the sidebar.php.. how can I make it appear in the sidebar in the correct location?

    Thank you.

  2. derFrankie says:

    It’s a great plugin but has one big flaw. If you have a month where you post just a few articles, and another where you post every other day you will get false results.

    You have to set the score for the homepage to “0” to avoid that posts camping on your homepage for month get a high ranking without merit.

Trackbacks/Pingbacks »

  1. Best WordPress Plugins – Great List! « Josephbryanmedia's Blog says: