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

30 Comments

  1. michuk says:

    Thanks for this plugin – works pretty well after some hacking. I just have one problem. For pages, it seems to be ignoring my pernament link structure and always makes the ugly links like: “http://blabla?page_id=54&cp=4#comments”. I can undestand that it needs some more params but I’d like the links to look like the usual uses, just params added. So, it should look like: “http://blabla/the/pernament/link/as/usual/?page_id=54&cp=4#comments”
    Is it easily achievable?

  2. […] I found a minor bug in the paged comments plugin when you are trying to use other queries on the URL. […]

  3. […] Ein sehr schönes Plugin für die Formatierung der Kommentare gibt es bei Keyvan Minoukadeh. Damit lassen sich die Kommentarfelder relativ leicht steuern und die Anzeige kann verschieden dargestellt werden. Zusätzlich wird ein Zähler integriert. Dadurch weis man schnell, mit welchem Beitrag man es zu tun hat – ist er Aktuell oder nicht. Weiterhin werden unnötig viele Beiträge ausgeblendet, was die Übersicht der Website um einiges erhöht, zumindest bei Einträgen >15 Einträge, die auf einigen Blocks in viel größere Dimensionen reichen.   […]

  4. Dan says:

    Using K2, uploaded the corresponding file but still get this error:

    Fatal error: Cannot redeclare k2_comment_type_detection() (previously declared in /home/newsmct4/public_html/imapia/wp-content/themes/k2/comments-paged.php:15) in /home/newsmct4/public_html/imapia/wp-content/themes/k2/comments-paged.php on line 2

  5. […] WordPress Paged Comment Plugin ????????????????????????????? Comment ?? post ?????????????????????? ?????????????????????????????????? ????????????? Comment ???????????? ???? Comment […]

  6. […] Keyvan Minoukadeh » WordPress Paged Comments Plugin (tags: wordpress plugin) […]

  7. Jay says:

    Installed this today as i’ve been looking for a simular plugin for a very very long time, but hasd to remove it after 10 minutes as it didn’t function as I would have liked it to.

    Unfortunatly the lack of a ‘send user to the default last page (depending on the config setup)’ feature is missing for the ASC order. Alot of people I presume look for 1,2,3,4 and want commenters sent to page 4 when they have commented.

    Personally i’m baffled as to why it isn’t a part of the plugin – i’d love to see it implemented in the future.

  8. Simulacrum says:

    I am using WordPress 2.0.4 and Pastel Paradise (http://www.wordpressdiva.com/themes/32/pastel-paradise.html) theme. And I have trouble with “paged comments” compatable with theme used me…

    I’m sorry that Paged comment is not independed from theme design…

  9. Keyvan says:

    Sorry I’m late replying to everyone. I will get through the comments soon. Very quickly…

    CK: Thanks for posting about the plugin. Will hopefully see what I can do for the next release. Thanks also for the fix. I use WP 1.5 on this site which deals with URLs through .htaccess rewrite rules. I’ll include a fix in the next version once I’ve tested for the bug on WP2. Thanks again.

    Jay: I’ll be looking to see if I can come up with a solution for this problem. Most of my code deals with the comment template and the way comments are pulled in and displayed. I haven’t even looked at the code that deals with new comment posts. CK has blogged about it and included some code. I haven’t had a chance to look into it very much but I’ll be looking at CK’s solution and seeing if there’s anything I can add for the next release.

    Simulacrum: Most of the time using the paged comments template I provide for the default theme will work fine. If you’ve tried that and it doesn’t work, then it’ll require more work to create a custom paged comments template for the theme. I’m hoping to make it easier in the next release, if not, there’ll be a guide on how to create a custom paged comments template for a theme.

    I’ll get back to the other comments soon.

  10. Simulacrum says:

    The template from defautl theme dont work propertly. I see two comments variants on one page :(. My theme comments full list and paged-comments generatad paged list.

  11. […] ???? ?? ?? kukie?? ???? ???? ??? Keyvan Minoukadeh?? WordPress Paged Comments Plugin? ?? ?????. ??? ??, ? ????? ????? ?? ?? ?????! ??? ????, ???? ????, ??? ??? ???? ??? ???. ?? ?? ??? ???? ?? ? ?????, ? ??? ???? ?? ????????. (??? ?? WordPress 2.0? ???? ????. ???? 1.5 ????? ????, ?? ??? ???? ??????!) […]

  12. UNO says:

    I don’t know how to modify the comments-page for my new theme. Something wrong with the Gravatar.

    http://hds.twbbs.org/~uno/index.php/guestbook/

  13. LiewCF says:

    will the plugin create duplicated pages for search engines?

  14. […] Paged Comments — As made obvious by the name, this plug-in allows paging of comments for those blog entries that receive many comments. I just installed this plug-in this last weekend since I have had quite a few blogs that were just getting way too long and unwieldly, and I’ve tweaked the code to match my unique comments logic. […]

  15. […] La solucion más lógica es implementar el paginado con un plugin para el WordPress ya que no tiene esta feature nativa. En efecto tengo probado este sistema en otros blogs y funciona bien salvo… que incrementa el numero de consultas SQL en 20 lo cual se pone a 41 consultas SQL para generar una simple página: menú, post y comentarios. […]

  16. […] I also installed a new guestbook using WordPress Paged Comments Plugin. I removed the comments capability for the gallery, news and other pages. Instead of commenting at the news page and subpages, people can only now leave their messages at the guestbook. […]

  17. paged comments

    Der Artikel über WoW-Sucht hier sprengt alle Rahmen. Mittlerweile hat er 832 Kommentare und ist, ohne Bilde und Skripte, alleine schon über 1,1 MB groß. Damit scheint wohl über irgend eine Grenze gestoßen zu sein, denn die Anzeige brach irgendwann…

  18. Gray Charles says:

    Has anyone gotten this to work with the latest release of K2? I’ve been hacking around but with no luck. I would dearly love an update.

  19. Keyvan says:

    Will try and reply to some comments soon. I am working on the new version. You can download the latest version from the trunk. I’ve had a few people ask about K2 so I’ve included an updated template for the K2 theme. I’m running it on my WP2 testbed if anyone wants to see how it looks on K2. (I don’t use K2 myself and haven’t played around with it very much, so it might not look/work the way you want, but feel free to tweak the comments-paged.php template to get it to work how you’d like.)

    The only update to the plugin itself so far is a function that runs when the template_redirect action is called. It reads in the appropriate template, looks for the comments_template() call, replaces it with paged_comments_template() before evaluating it. Essentially cutting out step 5. (I’m trying to make it easier to install, so any feedback would be great.)

  20. Gray Charles says:

    The “trunk” link does not work

  21. Raj says:

    When is the ajax version releasing?
    Any dates. i’d like to wait for the ajax version.

    Thanks for any update.

  22. […] ?????????????Robbin???????????????????????????????10????????????????? Comment page ?????Plugin – Paged Comments ????????????????????? […]

  23. […] Paged Commentsh3> Paged commentsa> plugin creates a pagination navigation for the comment entries. This is useful if you get a lot of comments. It allows you to customize how many comments to display per page, in descending or ascending order.p> […]

  24. Keyvan says:

    New release is now available. I’ve removed an installation step as it should now be taken care of. If you have problems with this release, please let me know. View changes.

    Gray Charles: There appears to be a problem with wp-plugins.org. I’ve just uploaded a new release which includes an updated template for the K2 theme.

    Raj: Sorry, still no date. I know there is a lot of interest in the Ajax version, but I haven’t had enough time to work on it.

  25. […] ????????????? plugin (???????? paged-comments ??????…)????? Fall Season ??? intro.php?????? flickr ???????????? Quotes ???????? About ??????? flickr? […]

  26. […] Studieren-Info – Basic template design Mandarin Design – For those who make mistakes Feed2JS – Feed to JavaScript familypress.net – Photopress plugin Akismet – Comment Spam and Trackback Spam plugin Homeland Stupidity – Bad Behavior plugin skippy.net – WP-DB-Backup plugin adahas.com – intouch plugin Zombie Robot – Randon Quote plugin randomfrequency.net – Search Pages plugin Semiologic – Static Front Page plugin WordPress – Code Is Poetry orderedlist.com – FeedBurner plugin katesgasis.com – KG Archives plugin Mingle With Ingle – Link Truncator Keyvan Minoukadeh – Paged Comments plugin geeksmakemehot.com – WordPress Guestbook James Koster – Six Shooter Media Lokesh Dhakar – Lightbox Image Viewer Firefox – Web Browser WordPress – Code Is Poetry […]

  27. […] Eltelt 14 nap, megtörtént az upgrade a 2.0.5-ös (Ronan) WordPressre. Ha már nekiláttam egy nagyobb munkának, akkor egy teljes renoválás is megejtettem ezzel együtt. Így felkerültek új pluginek az oldalra. Most már lehet audio állományokat beilleszteni, hála az Audio playernek. Fel lehet iratkozni és emailben értesítést kapni a hozzászólásokról, ez a Subscribe To Comments pluginnek köszönhet?. Végül pedig a reklámoknál lév? 178 hozzászólás lapokra bontását is megodottam a Paged Commentsel. Ezen kívül felkerült a legutolsó stabil 0.9.1-es K2 is, és 10 hónap után felraktam végre egy jó kis képet is a fejlécbe. […]

  28. Halil says:

    Good work, thanks for the update but as Raj already said Im also expecting the Ajax version with this new release.

    I’ll keep waiting….

  29. […] ???????PEAR??????????????????????(???paged comment????)????????????????????Paged Threaded comment????????????………..???????????????????????????paged comment???????????????? […]

  30. dom2 says:

    Thank you ! Very good plugin. It’s easy to use

  31. Camps says:

    Nice plugin, thank you a lot.

    I have the same problem of pavel.nesvadba (view comment 145)… notthing new about it?

    Bye!

  32. Pande says:

    Hi, I don’t know what’s wrong.
    I have diferents header for single pages and index. I get this error above the whole blog.

    http://www.blog.solonatacion.com/2006/09/20-question-tuesday/

    What I see is …..

    Warning: include(header_single.php) [function.include]: failed to open stream: No such file or directory in /home/.ergo/pandeblog/blog.solonatacion.com/wp-content/plugins/paged-comments.php(79) : eval()’d code on line 1

    Warning: include() [function.include]: Failed opening ‘header_single.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in /home/.ergo/pandeblog/blog.solonatacion.com/wp-content/plugins/paged-comments.php(79) : eval()’d code on line 1

    Thanks…

  33. Keyvan says:

    Dom2: Thanks!

    Camps: Thanks for bringing that issue up again, should be fixed in the next release.

    Pande: Could you try opening your single.php template file in the theme you’re using and replacing the call to comments_template() with
    if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template();

    Let me know if that fixes it.

  34. Pande says:

    I did the change you said, but unfortunately I get the same error.

    I know is the theme, but this is a test site, I want to use your plugin in my main site (www.pandeblog.net) that really have posts with hundreds of comments.

    Thanks

  35. Premasagar says:

    This is beautiful! Just what I was looking for.

    It’s now successfully employed at http://www.reclaimtheswastika.com/your-say/ where we are using WordPress simply to allow a single page for readers to leave a comment. I had got tired of seeing so many comments on one page…

    A suggestion for the documentation: it would be useful if you gave the specific lines of code that could be added or changed in the theme template. The site has a custom theme and a couple of other comments-based plugins installed, so I needed to make line-by-line comparisons between the existing template code and the code in your new comments template.

    Well done and thanks.

  36. […] He instalado en Pandeblog el WordPress Paged Comments Plugin que permite separar los comentarios de las entradas en varias páginas diferentes. En los posts muy populares (como los de RBD o los de Anorexia y Bulimia) es muy útil ya que una página con más de 700 comentarios es muy difícil de cargar con rapidez y supongo que trae de cabeza a la base de datos, ahora con 50 comentarios en cada página supongo que mejorará el rendimiento y la experiencia del usuario. Kevyan (el desarrollador del plugin) me ha respondido la consulta que le hice por mail y he podido solucionar un inconveniente que me surgía. […]

  37. Pande says:

    As you can see in my pingback, I fixed it .
    Thanks Keyvan!

  38. Keyvan says:

    Camps: New release fixes the fill_last_page issue when ordering is set to ASC. See revised code in action.

    Pande: Glad to hear it! 🙂

    Premasagar: Thanks! Will see what I can do about a guide for customising templates to work with the plugin.

  39. der says:

    Excellant plugin! I have a post that has over 500 comments and is such a pain on my server when it loads.

  40. rod says:

    Hi
    I’m traveling and have every day a few posts.
    I would like to have all comments of these posts on one page, and not only assotiated to the posts. Can paged coments do that?
    best Rod

  41. Papercuts3 says:

    Is it possible to integrate this into a theme rather than a plugin. I mean as part of a theme package entirely, for instance for K2?

  42. […] ??????? ????????? ??????? ??? ???????? ?????, ???-??? ???????? ????????? ?????? ?? ???????, ?????? ? ????????? ?????? ??? ????????????? ????????? ????????? paged-comments-2.5. […]

  43. Keyvan says:

    der: Thanks!

    rod: Paged Comments can’t do what you want—it only acts on comments associated with individual posts/pages.

    Papercuts3: It should be possible. It’s not something I’ve looked at, but I can’t see why you couldn’t include it as part of a theme.

  44. Hoboken411 says:

    I have a bug…

    I finally got it working.. but each pages starts the numbering again.. 1.. 2.. 3.. 4.. instead of keeping the numbering consistent… like you have 223.. 224… 225… etc.

    What may be the problem?

    Thanks!

  45. Hoboken411 says:

    Edit: Here are my settings:

    all_posts = true
    all_pages = false
    per_page = 20
    ordering = ASC
    page_range = 11
    fancy_url = false
    show_all_option = true
    fill_last_page = false
    show_all_ordering = ASC
    default_page = last

    I’m stumped!!

  46. Laura Gainey says:

    Hello everyone,

    Just a heads-up to everyone that we got this up and running smoothly on http://www.lauragainey.org – a memorial site for Laura Gainey, daughter of Montreal Canadiens Bob Gainey.

    The site is running WP 2.05, K2 0.9.1 and we succeeded in installing Paged Comments 2.5 as well as the theme for K2. It took about 10 minutes (and 20 minutes of carefully reading the instructions and previous comments here) to fully deploy. It’s looking good.

    Many thanks to Keyvan for this plugin. The Laura Gainey site is a non-profit tribute site, but if we get it on to other sites we host or manage, we’ll be sure to send a few bucks your way for your efforts.

    Great work.

    Rob
    RTM Communications – http://www.rtm.net

20 Trackbacks

  1. […] I found a minor bug in the paged comments plugin when you are trying to use other queries on the URL. […]

  2. By Diana in Norwegen » Test on 16 August 2006 at 10:34 pm

    […] Ein sehr schönes Plugin für die Formatierung der Kommentare gibt es bei Keyvan Minoukadeh. Damit lassen sich die Kommentarfelder relativ leicht steuern und die Anzeige kann verschieden dargestellt werden. Zusätzlich wird ein Zähler integriert. Dadurch weis man schnell, mit welchem Beitrag man es zu tun hat – ist er Aktuell oder nicht. Weiterhin werden unnötig viele Beiträge ausgeblendet, was die Übersicht der Website um einiges erhöht, zumindest bei Einträgen >15 Einträge, die auf einigen Blocks in viel größere Dimensionen reichen.   […]

  3. By ???????? Comment ???????????????? » Basicstep on 19 August 2006 at 7:05 am

    […] WordPress Paged Comment Plugin ????????????????????????????? Comment ?? post ?????????????????????? ?????????????????????????????????? ????????????? Comment ???????????? ???? Comment […]

  4. By Skylog » Blog Archive » links for 2006-08-22 on 22 August 2006 at 7:25 am

    […] Keyvan Minoukadeh » WordPress Paged Comments Plugin (tags: wordpress plugin) […]

  5. By Mei Clamo » ???? ?? Wordpress plugin on 26 September 2006 at 3:37 pm

    […] Paged Comments […]

  6. […] ???? ?? ?? kukie?? ???? ???? ??? Keyvan Minoukadeh?? WordPress Paged Comments Plugin? ?? ?????. ??? ??, ? ????? ????? ?? ?? ?????! ??? ????, ???? ????, ??? ??? ???? ??? ???. ?? ?? ??? ???? ?? ? ?????, ? ??? ???? ?? ????????. (??? ?? WordPress 2.0? ???? ????. ???? 1.5 ????? ????, ?? ??? ???? ??????!) […]

  7. […] Paged Comments — As made obvious by the name, this plug-in allows paging of comments for those blog entries that receive many comments. I just installed this plug-in this last weekend since I have had quite a few blogs that were just getting way too long and unwieldly, and I’ve tweaked the code to match my unique comments logic. […]

  8. […] La solucion más lógica es implementar el paginado con un plugin para el WordPress ya que no tiene esta feature nativa. En efecto tengo probado este sistema en otros blogs y funciona bien salvo… que incrementa el numero de consultas SQL en 20 lo cual se pone a 41 consultas SQL para generar una simple página: menú, post y comentarios. […]

  9. […] I also installed a new guestbook using WordPress Paged Comments Plugin. I removed the comments capability for the gallery, news and other pages. Instead of commenting at the news page and subpages, people can only now leave their messages at the guestbook. […]

  10. By [bronski.net] on 25 October 2006 at 10:34 am

    paged comments

    Der Artikel über WoW-Sucht hier sprengt alle Rahmen. Mittlerweile hat er 832 Kommentare und ist, ohne Bilde und Skripte, alleine schon über 1,1 MB groß. Damit scheint wohl über irgend eine Grenze gestoßen zu sein, denn die Anzeige brach irgendwann…

  11. By Marigold » Archiv » Krleš WordPress on 31 October 2006 at 9:51 pm

    […] Pagged Comments […]

  12. By » Comment ???? » ???????? on 4 November 2006 at 6:35 am

    […] ?????????????Robbin???????????????????????????????10????????????????? Comment page ?????Plugin – Paged Comments ????????????????????? […]

  13. By Wordpress plugins I use » Jonas Kastebo on 5 November 2006 at 1:34 am

    […] Paged Commentsh3> Paged commentsa> plugin creates a pagination navigation for the comment entries. This is useful if you get a lot of comments. It allows you to customize how many comments to display per page, in descending or ascending order.p> […]

  14. […] ????????????? plugin (???????? paged-comments ??????…)????? Fall Season ??? intro.php?????? flickr ???????????? Quotes ???????? About ??????? flickr? […]

  15. […] Studieren-Info – Basic template design Mandarin Design – For those who make mistakes Feed2JS – Feed to JavaScript familypress.net – Photopress plugin Akismet – Comment Spam and Trackback Spam plugin Homeland Stupidity – Bad Behavior plugin skippy.net – WP-DB-Backup plugin adahas.com – intouch plugin Zombie Robot – Randon Quote plugin randomfrequency.net – Search Pages plugin Semiologic – Static Front Page plugin WordPress – Code Is Poetry orderedlist.com – FeedBurner plugin katesgasis.com – KG Archives plugin Mingle With Ingle – Link Truncator Keyvan Minoukadeh – Paged Comments plugin geeksmakemehot.com – WordPress Guestbook James Koster – Six Shooter Media Lokesh Dhakar – Lightbox Image Viewer Firefox – Web Browser WordPress – Code Is Poetry […]

  16. By Ronan in da house! at Two Minute Warning on 12 November 2006 at 9:08 pm

    […] Eltelt 14 nap, megtörtént az upgrade a 2.0.5-ös (Ronan) WordPressre. Ha már nekiláttam egy nagyobb munkának, akkor egy teljes renoválás is megejtettem ezzel együtt. Így felkerültek új pluginek az oldalra. Most már lehet audio állományokat beilleszteni, hála az Audio playernek. Fel lehet iratkozni és emailben értesítést kapni a hozzászólásokról, ez a Subscribe To Comments pluginnek köszönhet?. Végül pedig a reklámoknál lév? 178 hozzászólás lapokra bontását is megodottam a Paged Commentsel. Ezen kívül felkerült a legutolsó stabil 0.9.1-es K2 is, és 10 hónap után felraktam végre egy jó kis képet is a fejlécbe. […]

  17. By Robbin.cc » ???? » [plugin]wp??Guestbook on 15 November 2006 at 2:05 am

    […] ???????PEAR??????????????????????(???paged comment????)????????????????????Paged Threaded comment????????????………..???????????????????????????paged comment???????????????? […]

  18. By Cambios en los comentarios de Pandeblog | Pandeblog on 29 November 2006 at 4:31 pm

    […] He instalado en Pandeblog el WordPress Paged Comments Plugin que permite separar los comentarios de las entradas en varias páginas diferentes. En los posts muy populares (como los de RBD o los de Anorexia y Bulimia) es muy útil ya que una página con más de 700 comentarios es muy difícil de cargar con rapidez y supongo que trae de cabeza a la base de datos, ahora con 50 comentarios en cada página supongo que mejorará el rendimiento y la experiencia del usuario. Kevyan (el desarrollador del plugin) me ha respondido la consulta que le hice por mail y he podido solucionar un inconveniente que me surgía. […]

  19. […] ??????? ????????? ??????? ??? ???????? ?????, ???-??? ???????? ????????? ?????? ?? ???????, ?????? ? ????????? ?????? ??? ????????????? ????????? ????????? paged-comments-2.5. […]

  20. By JINNYMARS|?????? » Archive » ??????Wordpress?? on 11 December 2006 at 2:21 pm

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