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

29 Comments

  1. GregM says:

    Hi Keyvan,

    Excellent — thank you both for the code suggestion and for the possibility of integrating the feature into future versions (and for access to that spiffy comment search)! I’m going to test this out…

    Now, this is interesting: you mentioned the possibility of making functions available to calculate paging at any stage… Coincidentally, this is very closely related to a duplicate content vulnerability in current versions of WordPress and WordPress MU:

    Yet Another Duplicate Content Vulnerability Hits WordPress, Movable Type Blogs

    When the problem was first reported, the developers elected not to fix the vulnerability, in part because by the time WordPress was aware that a page beyond the end of a paginated post was being requested, headers had already been sent — thus no possibility of a 301 or a 404.

    If it’s possible to make the function available to calculate comment paging soon enough to issue an error code before headers have been sent, would it also be possible to make a function available that would detect incorrect post paging soon enough to issue an error code?

    That would be ever-so-handy, and would enable a fix for the WordPress bug in one fell swoop!

    All the best,
    Greg

  2. uberdose says:

    Don’t get it working on a WP 2.2.2, no matter what theme I use, all other plugins disabled. What’s left of single posts is just:

    Read the rest of this entry »

    ‘); ?> Tags ‘

    Pages: ‘, ‘after’ => ‘
    ‘, ‘next_or_number’ => ‘number’)); ?>

    Sorry, no posts matched your criteria.

  3. Diwaker says:

    Hi Keyvan, I’ve got a version of comments-paged.php for Sandbox that I’m happy to share. Do you want me to email it to you? I couldn’t find one on this site 🙂

  4. Keyvan says:

    Anand: Firstly, sorry I missed this comment. To answer your question, there’s no easy way to do this at the moment without modifying the plugin file.

    Greg: I’m sure it’s possible for WordPress developers to write code that detects the number of pages required for a post before it’s displayed. I haven’t really kept up with WP developments—other than trying to ensure this plugin remains compatible—but last time I checked most of the useful post-related information is only made available within ‘the loop’ after headers and other content have been sent. It doesn’t have to be that way, but I can imagine it would require a lot of extra work to change.

    There are also the performance implications of checking every request to make sure it is valid. I still think it’s worth it and I’m sure if the WP team wanted to do it they’d be able to overcome the performance issues, e.g. by caching results.

    uberdose: That’s very strange. I hope it’s not a conflict with WP 2.2.2—I’ve only tested with 2.2.1. Has anyone else experienced similar problems?

    Diwaker: That would be great. Please do email it to me: keyvan(at)k1m.com. Thanks!

  5. […] There are some changes in the theme itself. I have modified Sandbox slightly to present the meta info about posts slightly differently. For posts with a lot of comments, the comments should now appear paged. I have a version of comments-paged.php for Sandbox (for use with the Paged Comments plugin) – if you need it, drop me a note. […]

  6. […] Yeni ekledi?im temalardan sonra bir de bir eklenti türkçele?tireyimde tam olsun mant???yla aramalar?m sonucu herkesin tam anlam?yla i?ini görecek WordPress Paged Comments Plugin eklentisiyle kar??la?t?m.Bu eklenti sayesinde yorumlar nedeniyle uzay?p giden yaz?lar?m?zda yorumlar? sayfaland?rabiliyorsunuz.Çat pat ingilizce bildi?im için eksikliklerim olabilir gerekli eksiklikleri üstadlar?m?z giderirse sevinirim. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  7. […] S?rr? Özden taraf?ndan Türkçe’ye çevirilen bu eklenti sayfam?zda uzay?p giden yorumlar? sayfalayarak, sayfam?z?n daha k?sa olmas?n? sa?lar ve yorumlar? okumay? kolayla?t?r?r. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  8. Pilarasa says:

    Works in comments popup?

    Thanks.

  9. John says:

    Very useful plugin. I had a slight problem with it and Permalinks Redirect, which was solved by editing Paged Comments:

    add_action('template_redirect', 'paged_comments_alter_source', 12);

    The 12 priority means that other plugins, such as Permalink Redirect, have a chance to look at the URL before Paged Comments kicks in.

  10. Keyvan says:

    Pilarasa: No, doesn’t work in popup mode. Maybe in a future version.

    John: Thanks. I actually added a priority value of 15 in version 2.6.3 to allow the WP-Print plugin to work—it also registers with that action. It’s good to know that it now works with other plugins too.

  11. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  12. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  13. Foehammer says:

    Thank you very much for fixing that conflict with WP-Print!

  14. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  15. usome says:

    Thank you very much for fixing that conflict with WP-Print!

  16. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  17. michaelooi says:

    Am using WP 2.2.2. Can’t get it to work. It can only show the first/latest page… but when clicked on other pages (incl. number/next/all), it will show a ‘page not found’ error.

    Any idea? (had the plugin disabled for the moment…)

  18. […] Update So, reinstalling the theme didn’t work. I figured it must’ve had something to do with any one of the stupid things I’ve been installing on here. I began deactivating plugins that I thought was conflicting with the plaintxtBlog theme. The offending plugin: Paged Comments. I don’t know why it’s messing up my blog, or the comments.php file, or whatever. I’m just glad that all it took to fix what was bothering me was disabling the plugin. I’m a happy girl now. […]

  19. […] Yeni ekledi?im temalardan sonra bir de bir eklenti türkçele?tireyimde tam olsun mant???yla aramalar?m sonucu herkesin tam anlam?yla i?ini görecek WordPress Paged Comments Plugin eklentisiyle kar??la?t?m.Bu eklenti sayesinde yorumlar nedeniyle uzay?p giden yaz?lar?m?zda yorumlar? sayfaland?rabiliyorsunuz.Çat pat ingilizce bildi?im için eksikliklerim olabilir gerekli eksiklikleri üstadlar?m?z giderirse sevinirim. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  20. […] S?rr? Özden taraf?ndan Türkçe’ye çevirilen bu eklenti sayfam?zda uzay?p giden yorumlar? sayfalayarak, sayfam?z?n daha k?sa olmas?n? sa?lar ve yorumlar? okumay? kolayla?t?r?r. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  21. Dennis says:

    Hi Keyvan,

    is it possible to display the number of pages when its not a page oder post. To show what i mean, dasmoment.com. You´ll see there a comments on the Frontpage, but not showing your plugin. Only if the post itself is shown like …index.php?p=1. Please it would be so nice.

    All the best, Dennis

  22. Trevor says:

    Hey Keyvan,
    Thanks for offering this excellent script! I am working on moving my blog to WordPress from MovableType.

    One of the reasons for the move is that I offer petitions that garner 35,000+ signatures and my traffic is growing quickly.

    I was considering using external guestbook software but your plug-in looks like it could do the job very well. Do you think doing dozens of petitions with many thousands of comments each would overload/bog down your plug-in or WP?

    Any suggestions would be greatly appreciated!
    Trevor

  23. Keyvan says:

    michaelooi: Not sure why. Have you tried using it with the default theme? If it works with the default theme then it’s probably incompatible with your theme. The only suggestion I have is to try the optional steps on this page (below the installation steps) and see if that helps.

    Dennis: I’ve never tried it and I don’t plan on implementing it. Sorry. But feel free to try it yourself, and if it turns out that it’s easy to integrate into the current code, let me know and I’ll include it.

    Trevor: I haven’t tested the plugin myself with those numbers, so I don’t want to promise anything, but I don’t think the plugin itself will put much of a strain on your server. If you look at the examples on this page, one of the sites has over 60,000 comments and it appears quite responsive to me. I’d be interested to hear how it turns out if you do go ahead and use the plugin with WordPress.

  24. […] Para habilitar la paginación de comentarios necesitaremos de algún plugin como Paged Comments. Pero precisamente por ser un plugin no representa una solución perfecta, ya que por ejemplo repite el texto de la entrada en las distintas páginas de comentarios y su integración con el tema es mejorable. […]

  25. DG says:

    Hi,

    When you’re going to release ajax-paged-comments? Or is there anyway we can try it on our site, advice.

  26. Tobi says:

    Hello Keyvan,

    you Plugin is really helpful. Thanks for your effort!
    I am using the german version of WP and all strings has been translated, but when your plugin is activated, all of the affected strings will shown in english. Is there a way to tell your plugin, that it should use the german description?

    Thanks!
    Tobi

  27. Estetik says:

    Thanks very beautiful plugin..

  28. […] What a jump huh? As you can imagine my site was running slow on Monday and occasionally would load DNS error messages. However, the WP-Cache plugin I installed brought the speed and loading of my site all back to normal. Another problem was that WordPress was trying to load all 700+ comments (and still growing) everytime someone tried to load that specific post. Luckily I found the paged comments plugin which helps by showing only a certain number of comments at a time and gives numbered pages for the rest. This saved a lot of loading time for readers and saved bandwidth use for me.   So fellow bloggers, if one of your posts gets dugg, stumbled-upon, etc. or you just suddenly get wild traffic one day – I highly recommend these plugins to help bring your site back to normal. Now I’m curious how this new traffic is going to affect my Alexa rank at the next update.  […]

  29. Tobi says:

    Can anyone please answer to my request?

    Thanks!

  30. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  31. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  32. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  33. […] Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  34. Cucirca says:

    Can you tell me if the comment pages are viewed as duplicate content?

    How can I deny robots from crawling separate pages?

    Thanks

    Florin

  35. nicusor says:

    Thank you for this plugin!

    I had to manually add the plugin’s changes to my theme, but it’s looking good now! Great job!

    Regards,
    Nick

    P.S. I keep an updated Do Follow List on my site (there are more than 270 sites listed already) and since you site is dofollow, I want to invite you to join.

  36. Keyvan says:

    DG: I still have no date for an AJAX release – I’ve just been too busy. I’m planning to include it in version 3.

    Tobi: By defining the WP_LANG constant in wp-config.php with an appropriate value (de_DE in your case) the plugin will try and find a matching language file in the paged-comments/languages/ folder. You will need to check to see if the paged-comments-de_DE.mo file is in that folder.

    Cucirca: I don’t know if search engines will view the comment pages as containing duplicate content. If you’re worried about it, please read the FAQ section on hiding the post body on comment pages.

  37. Mosey says:

    Hi,
    I’ve been really keen to use this plugin with HemingwayEx, but for whatever reason I keep receiving the non-object error >_

  38. Mosey says:

    Sorry, the previous comment broke off:

    Fatal error: Call to a member function on a non-object in /pathto/comments-paged.php on line 26

    even though I have tried to make the correct edits via the Diff report, parts starting from lines #25 and #58.I did try and make a search on the contents, and comment #comment-109605 and #comment-110144 both mention the same error, but without a conclusive answer.
    I am wondering if it’s because HemingwayEx uses
    “?php $counter=1; foreach ($comments as $comment) : ?”
    just after the ol code, so there is a clash, but any comments in the right direction would be much appreciated!

    Thanks in advance:D
    Mosey

  39. Keyvan says:

    Mosey: I’ll try that theme tonight or tomorrow and see if I have the same problem. Will post here if I have any news.

  40. Mosey says:

    Keyvan: Thank you – I really appreciate it! 🙂

  41. David says:

    I have a blog and this plugin is very helpful to write comments

  42. NeverEnd says:

    Hi, I’ve activated Paged-comments in my WordPress 2.3 test blog but I could not use it… I love it’s simplicity and smartness indeed, Could you give me some advice?

  43. […] Paged Comments — splits many comments into manageable pages. […]

  44. […] ????????????????????????????             ????????http://keyvan.net/code/paged-comments/ […]

  45. Estetik says:

    thank you Hi, I’ve activated Paged-comments in my WordPress 2.3 test blog but I could not use it… I love it’s simplicity and smartness indeed, Could you give me some advice?

  46. borokoa says:

    Dear Keyvan,

    I have a problem: the comments on an article do not show all, only the first several comments appear (this is especially true with articles having many comments). When I click any page number or “show all”, the message “Not Found! Sorry, no posts matched your criteria” appear. All comments in my “Guest Book” (Buku Tamu) appear in a long page, not divided in pages.

    I’m very grateful if you could help me fix this problem.

    borokoa

  47. […] Paged Comments – Breaks down comments into a number of pages. […]

21 Trackbacks

  1. By Floating Sun » Code updates on 14 August 2007 at 6:11 pm

    […] There are some changes in the theme itself. I have modified Sandbox slightly to present the meta info about posts slightly differently. For posts with a lot of comments, the comments should now appear paged. I have a version of comments-paged.php for Sandbox (for use with the Paged Comments plugin) – if you need it, drop me a note. […]

  2. By S?rr? ÖZDEN | Web Günlü?üm on 15 August 2007 at 2:38 pm

    […] Yeni ekledi?im temalardan sonra bir de bir eklenti türkçele?tireyimde tam olsun mant???yla aramalar?m sonucu herkesin tam anlam?yla i?ini görecek WordPress Paged Comments Plugin eklentisiyle kar??la?t?m.Bu eklenti sayesinde yorumlar nedeniyle uzay?p giden yaz?lar?m?zda yorumlar? sayfaland?rabiliyorsunuz.Çat pat ingilizce bildi?im için eksikliklerim olabilir gerekli eksiklikleri üstadlar?m?z giderirse sevinirim. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  3. […] S?rr? Özden taraf?ndan Türkçe’ye çevirilen bu eklenti sayfam?zda uzay?p giden yorumlar? sayfalayarak, sayfam?z?n daha k?sa olmas?n? sa?lar ve yorumlar? okumay? kolayla?t?r?r. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  4. By ???? ????? ???? 24? - Hooney.net on 23 August 2007 at 10:08 am

    […] Paged Comments […]

  5. By bilgiservisim » En iyi 100 wordpress eklentisi on 24 August 2007 at 12:46 pm

    […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  6. By 150 Adet Wordpress Turkce Aç?klamal? & LugatSoft on 24 August 2007 at 8:04 pm

    […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  7. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  8. […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  9. By ChangSure Blog » Blog Archive » Blog???????? on 30 August 2007 at 3:50 pm

    […] 3 Paged Comments […]

  10. By I digress / Annoying comment box on 31 August 2007 at 4:13 pm

    […] Update So, reinstalling the theme didn’t work. I figured it must’ve had something to do with any one of the stupid things I’ve been installing on here. I began deactivating plugins that I thought was conflicting with the plaintxtBlog theme. The offending plugin: Paged Comments. I don’t know why it’s messing up my blog, or the comments.php file, or whatever. I’m just glad that all it took to fix what was bothering me was disabling the plugin. I’m a happy girl now. […]

  11. […] Yeni ekledi?im temalardan sonra bir de bir eklenti türkçele?tireyimde tam olsun mant???yla aramalar?m sonucu herkesin tam anlam?yla i?ini görecek WordPress Paged Comments Plugin eklentisiyle kar??la?t?m.Bu eklenti sayesinde yorumlar nedeniyle uzay?p giden yaz?lar?m?zda yorumlar? sayfaland?rabiliyorsunuz.Çat pat ingilizce bildi?im için eksikliklerim olabilir gerekli eksiklikleri üstadlar?m?z giderirse sevinirim. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  12. […] S?rr? Özden taraf?ndan Türkçe’ye çevirilen bu eklenti sayfam?zda uzay?p giden yorumlar? sayfalayarak, sayfam?z?n daha k?sa olmas?n? sa?lar ve yorumlar? okumay? kolayla?t?r?r. Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  13. […] Para habilitar la paginación de comentarios necesitaremos de algún plugin como Paged Comments. Pero precisamente por ser un plugin no representa una solución perfecta, ya que por ejemplo repite el texto de la entrada en las distintas páginas de comentarios y su integración con el tema es mejorable. […]

  14. By Traffic Overload Tips and Suggestions » TallFreak.com on 16 September 2007 at 7:23 am

    […] What a jump huh? As you can imagine my site was running slow on Monday and occasionally would load DNS error messages. However, the WP-Cache plugin I installed brought the speed and loading of my site all back to normal. Another problem was that WordPress was trying to load all 700+ comments (and still growing) everytime someone tried to load that specific post. Luckily I found the paged comments plugin which helps by showing only a certain number of comments at a time and gives numbered pages for the rest. This saved a lot of loading time for readers and saved bandwidth use for me.   So fellow bloggers, if one of your posts gets dugg, stumbled-upon, etc. or you just suddenly get wild traffic one day – I highly recommend these plugins to help bring your site back to normal. Now I’m curious how this new traffic is going to affect my Alexa rank at the next update.  […]

  15. By En iyi 100 wordpress eklentisi | Turkmecmua on 18 September 2007 at 11:50 pm

    […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  16. By En iyi 100 wordpress eklentisi | Turkmecmua on 18 September 2007 at 11:50 pm

    […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  17. By En iyi 100 wordpress eklentisi | Turkmecmua on 18 September 2007 at 11:50 pm

    […] Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Link […]

  18. […] Eklenti Ad? : WordPress Paged Comments Plugin ??levi : Her 10 yorumda bir sayfalama yaparak sayfalar?m?z?n uzay?p gitmesini engeller. Kaynak : WordPress Paged Comments Plugin […]

  19. […] Paged Comments — splits many comments into manageable pages. […]

  20. By ???? | ???????Paged Comments - DesignLinks.cn on 28 September 2007 at 3:36 am

    […] ????????????????????????????             ????????http://keyvan.net/code/paged-comments/ […]

  21. By My favorite WordPress Resources | sebthom.de on 30 September 2007 at 10:10 am

    […] Paged Comments – Breaks down comments into a number of pages. […]