WordPress Paged Comments Plugin

This plugin is no longer being developed. WordPress has had paged comments support in the core since version 2.7. The comment paging you see here is using WordPress’s built-in code and not my plugin.

Paged Comments is a plugin for WordPress to allow comment paging. Useful for those popular blog entries receiving many comments, or a simple guestbook page within WordPress.

Features

  • Comment ordering: show latest comments first, or last
  • Specify number of comments to display per page
  • Enable paging for all posts and pages, or on a per-post basis
  • Give users the choice to view all comments on one page with a ‘show all’ link
  • Specify the first or last page of comments to load by default
  • See paged-comments-config-sample.php for more

Download — Latest Version

Installation (for WordPress 2.3 up to 2.7)

If you’re upgrading from a previous version, skip these installation steps and read the upgrade steps. Note: WordPress’ automatic upgrade feature will erase the plugin’s config file. If you’re going to use it, make sure you backup your paged-comments-config.php file first.

  1. Download and extract plugin files to a folder locally.
  2. Read through and edit paged-comments-config-sample.php to configure, then save the file as paged-comments-config.php.
  3. Upload the whole paged-comments directory to /wp-content/plugins/. The plugin files should now be in /wp-content/plugins/paged-comments/.
  4. Enable the plugin through the WordPress admin interface. That’s it!

Optional Steps

  • WP 2.7 users: If use_wp_config is set to true (default), you can make changes to the plugin config using the WP admin interface. Go to Settings > Discussion and look under ‘Other comment settings’.
  • To customise the template to work better with your theme: Open the plugin’s themes folder and find the subfolder corresponding to the WordPress theme you’d like paged comments enabled on (or if your theme isn’t listed, choose the ‘default’ folder). Upload comments-paged.php to the appropriate WordPress theme folder (found in [wordpress]/wp-content/themes/).

    For example, if you’re using the default WordPress theme, copy [paged-comments-plugin]/themes/default/comments-paged.php to [wordpress]/wp-content/themes/default/. (The plugin always tries to load comments-paged.php from your active theme folder first.)

    Make any modifications to comments-paged.php. The file is based on the comments.php file, so if your theme is very different it might be easier to copy in the necessary elements from paged-comments.php. View the diff report to see what you need to change.

Examples of Use

The comments on this page are handled by the plugin, but it’s also used by the following sites:

Questions?

Paid Support

If you run a commercial site and you’re having difficulty setting up paged comments, I offer paid support. Feel free to get in touch: keyvan (at) k1m.com

540 Comments

  1. Posted 11 August 2008 at 11:51 pm | Permalink

    Keyvan, I was using the permalink format: %postname%-%post_id%

    What is weird is that this doesn’t effect the URL of pages, which is where I was having the problem.

    I haven’t got as far as sorting out comments on posts. I’ll let you know if I have any further issues with it.

  2. ParisReply
    Posted 12 August 2008 at 5:18 am | Permalink

    Yes Keyvan I’m testing it in a different way.
    I set My Blog Home address
    example.com
    My WordPress address
    example.com/wordpress
    the page number will be shown but when I click It will display a wrong link (example.com/wordpress/?p=5&cp=1#comments) this link can’t work on my site. The right link should be (example.com/?p=5&cp=1#comments)

    when I set My Blog Home address
    example.com
    My WordPress address
    example.com
    the page link can work very well but I can’t login in my wordpress and all the CSS disappear.

    when I set My Blog Home address
    example.com/wordpress
    My WordPress address
    example.com/wordpress
    everything works perfect
    but I don’t wanna my site permalink containing a /wordpress/
    all I wanna do is set My Blog Home address
    example.com
    My WordPress address
    example.com/wordpress

    however it can’t work well I don’t know why?
    (I’m from China I use WP2.6 English version and paged comments Version 2.7.1)Thank you!

  3. Posted 12 August 2008 at 12:40 pm | Permalink

    I am having the same problem as Paris. Example: In this post when I click on page 3. It tries to take me here. That is not where my posts/blogs are located.

    I think what Paris meant by “subdirectory (example.com/wordpress) and homedirectory (example.com)” is
    wordpress address (example.com/wordpress) and blog address (example.com). I have wordpress in it’s own directory while my blog remains in my root directory (Read)

    Please let me know if a solution to this problem becomes available. Thanks!

  4. Posted 12 August 2008 at 1:02 pm | Permalink

    Dan: Thanks, I’m going to look into it and see if I can reproduce the problem using custom permalinks.

    Paris, Christina: Thanks for the information. I have to admit, I wasn’t aware you could set WordPress up in this way. Expect another release soon. :)

  5. Posted 12 August 2008 at 11:05 pm | Permalink

    Hi keyvan, thank you for your plugin. It help me because i have a page with more than 350 comments and it’s impossible to display without a pagination script. I encounter a little problem. I have chose to display my comments with a DESC order. the script works well but if there is only 2 comments left at the end of the modulo, the first page of the pagination will contain only 2 comments, even if chosse to display 25 comments per page. Do you understand what I mean? Sorry for my english. I hope you could help me.

    thanks

  6. Posted 12 August 2008 at 11:07 pm | Permalink

    I note this is the same thing here. there is at the moment 8 comments even if you propably choose to display 10. is there any solution to resolve this little bug?

  7. Posted 12 August 2008 at 11:28 pm | Permalink

    skapiso: You can change the behaviour by setting fill_last_page to true in the config file. The reason it works the way it does is to prevent comments moving from page to page. It’s not very convenient for viewing comments, but does make it easier for people trying to link to a specific comment, or coming in from a search engine.

  8. otto
    Posted 12 August 2008 at 11:43 pm | Permalink

    Hi keyvan, I wana know if it’s possible to hide the “show all” option because I have an “Maximum execution time of 30 seconds exceeded” error when I try to display the 300 comments of my page. It’s strange because your page counts more than 700 ….

    Thanks a lot

  9. Posted 13 August 2008 at 10:45 am | Permalink

    Hi keyvan, I see what you mean by there. In my utilisation I d’ont need to link my comments, so I’ll trie your option.

    Thank you for your help and keep courage for the futur ajax version :)

  10. Posted 14 August 2008 at 9:25 am | Permalink

    I feel like a dolt for not being able to figure this out and I didn’t see anyone else having this problem here, but does anybody know how to get the navigation to show up? What I mean is that page numbers and the next / previous arrows simply aren’t showing up on my posts.

    The plugin works great at filtering my comments down to 25 per page and ordering them in ASC, but all I’m seeing is 25 comments with no way to get to the rest. What am I doing wrong at 3:25am? :)

  11. Posted 14 August 2008 at 9:32 am | Permalink

    Jesus, sorry about this double post. Of course after spending 30 minutes trying to figure out what was wrong, I find it 2 seconds after posting for help.

    Looks like this plugin and the AJAX comment one I use are incompatible. Oh well, no biggie I guess. Here’s the site of the plugin, just in case you didn’t know about it.

    http://wordpress.smullindesign.com/plugins/ajax-comments

  12. Posted 19 August 2008 at 2:45 pm | Permalink

    Hi, I just managed to fix the problem with page-comment-num fancy urls not working on custom permalinks structure, actually the problem was the paged-comments expect slash at the permalinks structure while it doesn’t need to be there (it is not in my case: /%category%/%postname%)

    Here’s the patch that does the job for me:
    http://www.nanoant.com/download/patches/paged-comments_cope-with-permalinks-wo-slash.patch

  13. Posted 19 August 2008 at 6:40 pm | Permalink

    otto: Please try setting show_all_option to false.

    Goob: Thanks for letting me know. I don’t have time to look into compatibility issues right now, but I’ll keep it mind.

  14. Posted 19 August 2008 at 6:41 pm | Permalink

    2.8 release

    This release should fix the following issues:

    • Invalid URLs generated when WordPress installed in its own directory (thanks Christina, Paris)
    • Permalink structures with no trailing slash not handled correctly (thanks Adam, Dan)
  15. Paris
    Posted 20 August 2008 at 5:36 am | Permalink

    Keyvan: thank you so much. You really fix the problem in version 2.8 and paged comments works very well when WordPress installed in its own directory. Thanks you again! If you come to China, I’ll definitly buy you a coffee.

  16. Posted 20 August 2008 at 9:02 pm | Permalink

    Paris: Thanks! Glad it’s working for you now. :)

  17. caro
    Posted 21 August 2008 at 5:54 pm | Permalink

    Excellent work! But, I want to use the Spanish language, what should I do?

  18. Posted 22 August 2008 at 9:30 pm | Permalink

    Problem with the 2.8 upgrade.

    Initially I used the upgrade button provided on the WP plugin page. It seems to do it but the paged-comments entry on the plugins page vanishes. On my second one I did it by hand and it was ok. Looking closer it seems that when done automatically it ends up too deep in the directory hierarchy i.e. …\plugins\pages-comments\paged-comments\… When I moved it up one then it was ok again. The zip seems to be structured like that as well.

  19. Posted 23 August 2008 at 1:56 am | Permalink

    caro: You specify the language in your wp-config.php file. See here. Let me know if that helps.

    Rick: Thanks for letting me know. I guess the automatic upgrade option uses the WP plugin directory. I just tried downloading the current release from the plugin directory and it had the nesting problem you mention. Unfortunately I don’t have much control over that – and I’ve had problems with it in the past. As far as I know I can’t tell it to use the releases that I make available on my site. I’ve just restructured the directories on the subversion server, however, and that appears to have fixed it. Thanks again.

  20. Posted 23 August 2008 at 10:58 am | Permalink

    Keyvan

    Many thanks for your help in #706, and I now have Paged Comments 2.8 running with Tiga-06 and looking good. There is just one problem, referred to by Hoboken in #248 and Roger in #676. The numbering starts again from 1 on each page and I can’t find a fix in any of the other comments here. No problem when using All Pages and the permalinks seem to be OK..

    The relevant code in the template file seems to be:

    <a class=”comment-num”
    href=”#comment-<?php comment_ID() ?>”
    title=”<?php _te(‘Permanent link to this comment’); ?>”>
    <?php echo $comment_num ?>

    [Edited to fix markup]

    Unfortunately I am nor a php mechanic and I am reluctant to fiddle with this as Paged Comments will be running on only one page on my blog (where there are over 1200 comments) and I don’t want to risk jogging everything.

    Sorry to come back to you yet again.

  21. Posted 23 August 2008 at 4:29 pm | Permalink

    I think I’ve found a bug : when using this plugin the comment form fields (Name, Mail, Website) are never pre-filled with the info stored in cookies. I’ve tried it on two blogs (WP 2.6.1, default config for the plugin) and it happens on both sites.

    By the way, I’ve verified that the cookies are correctly set and are retained by the browser.

  22. Posted 24 August 2008 at 9:28 pm | Permalink

    Hi Keyvan!

    First time for me that I use the automatic plugin update function of WP 2.6 and Paged comments auto-update (from 2.7.1 to 2.8) deleted my previous ‘paged-comments-config.php’ file…. Fortunatly, I did this auto-update only on my local testing-server, just before updating WP to 2.6.1 (that I will do in a few minutes) and I could retreive my settings from my online server.

    It seems that the auto-update fully erase Paged comments folder… Is it a bug that you could fix (is it already fixed?) or have I done something wrong?

    Again, many thanx for this plugin ;) !

    Johan

  23. Posted 31 August 2008 at 5:22 pm | Permalink

    Tony: If you look at the difference report (specifically diff #3), you’ll see where I’ve included code to give you the correct comment number. In addition to that I disabled the list numbering that WP uses by default with the following CSS rule: style=”list-style-type: none;”. You’ll see that in the diff report as well. Hope that helps.

    W-Shadow: I’ll have a look into this. Thanks for letting me know.

    Johan: I’ve never used the auto-update feature myself, so I’m not sure how the update is handled. But I’ll take a look and see if I have the same problem. Thanks for letting me know.

  24. Posted 1 September 2008 at 8:52 am | Permalink

    @W-Shadow:
    I agree with you, this is a bug. Paged comments is currently whiping the pre-filled info on the comment form :( Anyone can search for a fix? Sadly I’m not a php coder.

  25. Posted 3 September 2008 at 10:19 pm | Permalink

    Keyvan: It worked in the end, and it was worth it. Many thanks for your help and patience with a php newbie.

  26. Posted 6 September 2008 at 7:03 am | Permalink

    Great plugin! Been meaning to install it for AGES but I only finally go around to it the other day, heh.

    One suggestion though: the option to exclude pings from being listed. I display my pingbacks seperately.

    I’ve hacked the plugin’s queries myself to make that happen, but it’d be nice if it was just a configuration option.

  27. Posted 7 September 2008 at 4:13 pm | Permalink

    Great plugin but it’s difficoult for me to integrate the comments.paged.php files in my theme… someone have a modified version of the file for the DUFFY themes (by Infocreek)
    Thanks for your attention
    Nicola

  28. Posted 10 September 2008 at 7:25 am | Permalink

    Version 2.7 and 2.8 both have a problem with session state. Reverting to version 2.6.4 solved our problem.

    This is the same bug that W-Shadow mentioned on the prev. page.

  29. anonymous
    Posted 18 September 2008 at 11:38 am | Permalink

    Hey Keyvan,

    Could you look into Post 741 by DarkPepe? I got the same problem. For example, i have set my comments form to german. By using the plugin it overwrites this settings, reverting it to english. Any way to fix this perhaps?

    greetings

  30. Posted 22 September 2008 at 4:08 pm | Permalink

    Hey!
    What a great plugin!

    But I have a problem. I used it to create a guestbook (see weblink) but now i have all sites listed between the text and the comments, when the plugin is active. Could you please help me? Thanks a lot!

    Greetings from Germany!

    Tobias

  31. Posted 24 September 2008 at 8:31 pm | Permalink

    Hi I’m using Version 2.8 (2008-08-19) – your plugin breaks the <!–nextpage–> function in static pages.

    Do you know how I can solve this problem?

    thanks a lot
    Monika

  32. Posted 8 October 2008 at 12:04 am | Permalink

    Hey, Great job, and great plugin. We used it on WP 2.3, we upgraded to WP 2.6, but the plug-in seems not to work. We are using version 2.8. could yo please check it? Thanks in advance

  33. Posted 14 October 2008 at 10:43 pm | Permalink

    Great plug-in. I missed the comment numbering in the comments, mite want to mention it in the readme – ben looking for a solution for a while, most of our posts have +1000 comments

  34. jay
    Posted 28 October 2008 at 11:33 pm | Permalink

    I am trying to use your paged comments plug in but having issues.

    When I activate it the comment text enter area becomes way too wide. Any ideas.

    jason

  35. Mike101
    Posted 29 October 2008 at 7:51 pm | Permalink

    I’ve got an issue about the plugin :

    Links such as /?p=123#comment-1234 are broken when they link to a comment on page 2,3 etc.

    I’ve read all kinds of documentation.

    I’ve tried tweaking the config of paged_comments.

    I’ve enabled and disabled permalinks in different modes.

    I’ve tried to add an add_rewrite_rule.

    Everything failed.

    Any help ?

  36. Posted 3 November 2008 at 9:05 pm | Permalink

    Hi there – Is there a reason the page listing sits in my last commenter’s comment? In other words, the “page 3 of 3…” is between my last commenter’s name and their comment. What should I do?

  37. thomas
    Posted 15 November 2008 at 2:45 am | Permalink

    Keyan – did you found a solution for this bug:

    I agree with you, this is a bug. Paged comments is currently whiping the pre-filled info on the comment form Anyone can search for a fix? Sadly I’m not a php coder.

    help – would be really great

    thanx for your work!!!!!!!!! anyhow
    cheers thomas

  38. goku
    Posted 2 December 2008 at 6:43 pm | Permalink

    Am I supposed to erase my comments page, and just add the files from the comments-paged to my themes comment feature? Do I just copy everything from yours to mine?

  39. Posted 5 December 2008 at 10:26 pm | Permalink

    Love the plugin but i would like to customize the look. i can go into the code and adapt if but i think you need to have an option much like the wordpress page navi. even better, if a user has it installed pull the formatting from those settings to keep things consistent.

  40. jack
    Posted 12 December 2008 at 8:47 am | Permalink

    hello, does not work with wordpress 2.7

    Please, can you verify?

    thanks.

  41. Posted 12 December 2008 at 4:09 pm | Permalink

    WordPress 2.7
    WP 2.7 comes with comment paging built in. So there is a good chance the plugin will not work, and probably won’t be needed if you’re already using WP 2.7.

  42. someone
    Posted 13 December 2008 at 11:14 pm | Permalink

    no it doesn’t work with WordPress 2.7

  43. sandra
    Posted 14 December 2008 at 1:23 am | Permalink

    Hi, the comments paged of wordpress 2.7 not work on many themes, their Paged Comments plugin is easy to configure and the best option.
    Please update, thank you.

  44. Posted 14 December 2008 at 6:35 pm | Permalink

    I hope that you can continue the Paged-Comments plugin for us. :)

    Although the WordPress 2.7 has the built-in paged comments function, I found that will load all comments belong to a post-id into memory (select comments without limit). I have a guest-book contain over 35000+ comments, thus after upgrading to 2.7 I get memory-allocate problem in sometime.

    Using paged-comments I never got the problem.

    Besides, the WordPress 2.7 built-in paged-comments sucks. If I have 15 comments, and every 10 comments a page, the 1st comment page will only display 5 comments, not 10 comments. Your paged-comments has no such problem, so please go ahead to develop the next version for us, thank you.

  45. Posted 15 December 2008 at 6:18 am | Permalink

    I agree with Johnson.Wang!!!
    Please, continue develop this cool plugin.

    I have tested it on 2.7 and it works!

  46. Posted 16 December 2008 at 11:22 am | Permalink

    It works somewhat on WP 2.7, but the navigation seems broken… can we hope for a fix?

  47. Posted 17 December 2008 at 7:59 am | Permalink

    Hi, I´m using your plugin too. It works greak! but in WP 2.7 navigation doesn´t work. I really need it to work. Thanks a lot!

  48. Posted 17 December 2008 at 6:45 pm | Permalink

    Hey,

    The plugin is simply great, but I think there is a bug in it.

    I am running wp 2.7 and, there seems to be a problem with pagination of posts using pretty permalinks.

    Is there any way to modify the comment page links ?

    Regards

  49. Posted 18 December 2008 at 7:35 pm | Permalink

    ^^^
    same here. pagenavigation doesn’t work with wp 2.7 and permalinks.

  50. Posted 19 December 2008 at 9:10 am | Permalink

    Hey Keyvan. I had been using your plugin on my site for a while now and was really happy with the way it worked and how configurable it was. After upgrading to 2.7, as I’m sure you already know, the permalinks/pagination got screwed up. It did continue to page the comments it seems, but when I clicked on a page number it wouldn’t take me to it.

    I noticed in a previous comment you said that 2.7 already has paged comments so you would discontinue this plugin, but that would be a mistake given that 2.7’s paged comments are nowhere near as flexible or powerful as your plugin allows. I believe many of us would at least appreciate it if you could tell us what you think is wrong with the plugin so we could try and fix it ourselves. I imagine it has something to do with it using permalinks similar to 2.7’s paged comments permalinks, maybe 2.7 kept wanting to direct the permalinks instead of allowing the plugin to?

    Thanks I really appreciate the work you have done.

281 Trackbacks