Popularity Contest Plugin for WordPress
This a plugin that I had not gotten around to installing to my selection of best plugins and a reader this weekend recommended that I should get it installed download it here. The Popularity Contest plugin is just like many other Wordpress plugins was extremely easy to install and activate. The problem I then faced was that I wanted a top posts page at the top of my blog and the plugin does not come with any page templates. So what I did at the end of day after many hours of trying to figure this mess out. I used the page_archives.php file and edited it with the necessary code that the popularity contest plug-in needed to display on the page template (Top Posts).
This plugin will help you see which of your posts are most popular. Views, comments, etc. are tracked and given configurable point values to determine popularity and then can be displayed on your sidebar or a archive page.
My code Top Posts (Page Template):
<?php
/*
Template Name: Top Posts
*/
?>
<?php get_header();?>
<div id=”content”>
<div id=”content-main”>
<div class=”post”><h2 class=”post-title”><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></a></h2>
<p class=”post-info”><?php edit_post_link(); ?></p>
<div class=”entry”>
<h2><?php _e(’Most Popular’); ?></h2>
<ul><?php akpc_most_popular(); ?></ul>
</div>
</div>
</div><!– end id:content-main –>
<?php get_sidebar();?>
<?php get_footer();?>
The plugin comes with other coding templates that can be added too display your top posts by category and such but I still have not figured out how to make that work. If you know then you can enlighten me by commenting because I am giving up for today on this coding headache. If you want what I have figured out then just copy the code and save it as TopPosts.php and upload it to your theme directory folder and then go to the pages section and select the template on the right hand side. I know that some themes already have a top posts template available for selection but mine did not and if it does then I could not find it. Anyway I am still working on my top posts page and eventually I will have it with categories and good luck to those that have not yet attempted this.
Ok update: I now have tops post by category! I was able to accomplish this by using another plugin Top Posts it allows you to display your best posts, as determined by the number of visits to the post or number of comments by category. So, I am now running two plugins for my top posts page the Popularity Contest and Top Posts. To add the second plugin I downloaded it and activated it and then added this code <?php tpbc_list ();?>to my TopPosts.php file I created.
So my frustration is finally over and my Top Posts Page is now open for business, enjoy.
comments
Maybe You Missed These Posts:
- Secure PHP Contact Form Plugin
- WordPress Stats Plugin Release
- Wordpress Plugins War II
- Wordpress Plugins Equal Traffic
- Popularity Equals Optimization - PEO
- Buy Me A Beer Plugin
- Wordpress Plugins Related Posts
3 Responses to “Popularity Contest Plugin for WordPress”
Leave a Reply





Hey, you’re on a learning curve and rocking it! Good job!
Very nice! It looks really neat and professional. I bet everyone starts copying what you’ve done!
Today I figured out how to line up the Top Posts with the Popularity Posts by editing the top posts plugin code. It took some time but it looks much better now.