Support » Plugins » Most Popular and Commented Posts Plug in

  • I’m looking for a way to add a ‘most popular posts’ and/or ‘most commented on posts’ category to my sidebar. I have searched the forum and can’t seem to find this plugin

    any link in the right direction for this would be much appreciated.



Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you looked through the plugins here:
    (Google cache for page if Codex is down)

    Try my Popularity Contest plugin:

    Dear AlexKing.

    Thanks for your hard work and recommendation

    My only question

    It’s very easy to activate.

    My one question is that I’d like to remove the “Popularity: 12% [?]” from each post.

    I only want to have the “Comments” tag viewable on my site’s sidebar.

    Is that possible?



    To remove the displayed information, read the README:

    Showing the other lists in the sidebar can be done, but would require you to make a few modifications on your own.

    I recently wrote a custom WordPress query to retrieve the most popular post (based on # of comments) on my site and give me access to the post title, excerpt, slug, date, and # of comments. The following code can go inside or outside The Loop. It will work both ways. You will also need to add the appropriate formatting for your site to make it look good, of course.

    $hotTopic = $wpdb->get_row("SELECT count(comment_id) as comments, comment_post_id, wp_posts.post_title, wp_posts.post_excerpt, wp_posts.post_name, wp_posts.post_date FROM wp_comments LEFT JOIN wp_posts on comment_post_id=wp_posts.ID WHERE comment_approved != 'spam' GROUP BY comment_post_id ORDER by comments DESC LIMIT 1");
    if (isset($hotTopic) || $hotTopic) {
    echo $hotTopic->post_title; // Post Title
    echo $hotTopic->comments; // # Comments
    echo trim($hotTopic->post_excerpt); // Post Excerpt
    echo$hotTopic->post_name; // Post Slug
    echo date('l, F jS, Y',strtotime($hotTopic->post_date)); // Post Date w/ formatting

    – Chris

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Most Popular and Commented Posts Plug in’ is closed to new replies.