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. […] « ??paged-comments 6 ?23rd ????Paged Threaded Comments 1 Views · No Comments ??????PagedComments???? […]

  2. […] ???????????ajax-comment-reply,?????????paged-comment???????????????ajax???????????? […]

  3. […] There is built-in (but optional) support for my favourite plugins—Akismet, Custom Comments, Get Recent Comments, Gravatar and Paged Comments. […]

  4. […] J’ai trouvé AJAX Paged Comments mais l’auteur ne partage pas son code. Il y a bien Paged Comments mais il n’est pas AJAX-Style et impose donc un rechargement complet de la page, pas très esthétique tout ça. […]

  5. Nuetral says:

    Really looking forward to your AJAX paged comments. The demo looks awesome!

    Any idea when it might be done?

  6. thin says:

    Used this Paged Comments Plugin, the wp-print cann’t normal operation!Look at the trouble,Thank very much!

  7. […] 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. This is a great plugin, thanks! One problem I have is that it doesn’t honor my themes comment template. For instance, I’m using sandbox which has extremely semantic rich markup and I do all my styling using CSS. But a lot of that doesn’t work when I activate this plugin, because it generates its own markup for comments. What are your thoughts on this?

  9. Keyvan says:

    ????: I’ve never used popup comments, but if I get time I’ll have a look and see if there’s anyway I can support popup comments.

    Nuetral: Version 3 should let you enable AJAX paging – I can’t give a release date though. It’s the most requested feature at the moment, but it’s also the feature that requires the most work.

    thin: The wp-print incompatibility has been mentioned before. I’ll try and look into it for the next version.

    Diwaker: I don’t know of an easy way to enable paging without altering the comments.php markup. By default, the plugin uses a modified comments.php file based on the one supplied with the default WP theme. You can see a side by side code comparison of the changes. If you open the comments.php file supplied in the sandbox theme you should be able to copy in the highlighted code and save the file as comments-paged.php in your sandbox theme folder. The plugin will look for this before attempting to load the bundled template (based on WP’s default theme). Hope that helps.

    If you do happen to create a version of the template for the sandbox theme, please let me know. I’d like to include one in the next release.

  10. […] Paged Comments – What’s great with this plugin, you ask? This breaks down comments into a number of pages, which is perfect if you have, let’s say, a hundred comments in a particular post. By Keyvan Minoukadeh. […]

  11. thin says:

    @Keyvan
    Thank you for your reply, I am looking forward to a version!
    🙂

  12. Leon says:

    Thank you so much!

    I had tried this plug-in before, but because the theme I’m using didn’t work straight away, I had given up.

    Had another look tonight and actually perused this site enough to be made to think about comparing the comments.php and comments-paged.php files together — EASY(ish)!

    Now, I don’t crash Firefox 2 on the Mac everytime I check my 250~ comment page 😛

    Great work guys n girls!

  13. […] ???????? ??????(????)?????????????(trackback)?? […]

  14. […] L’altro giorno ho fatto una piccola modifica al mio blog in modo da renderlo più efficiente: ho installato un plugin che dividesse in pagine i commenti e ho modificato il foglio di stile in modo da evidenziare con un solo colpo d’occhio il commento dell’autore del blog (ovvero me) da quelli di tutti gli altri. Questa esigenza è nata dal fatto che alcuni miei articoli hanno centinaia di commenti (come Xbox 360 vs PlayStation 3 con 555 commenti e 999 inviti Joost tutti per voi con 166) che inficiavano notevolmente le prestazioni del sito durante il caricamento della pagina. Inoltre, tra tutti questi articoli, era necessario effettuare un highlight dei commenti dell’autore, in modo da evidenziare, tra le centinaia di commenti, le mie risposte. Il primo passo è stato quello di installare la versione 2.6.2 del plugin per WordPress Paged Comments. Il suo funzionamento è veramente semplice, quello che forse è più complicato è la procedura per adattare il plugin al template del proprio sito. […]

  15. […] This plugin is a combination of Brian’s Threaded Comments and Keyvan’s Paged Comments Plugin, based on the work of Trustin Lee. […]

  16. […] Generates a guestbook for WordPress blogs. Once activated, click on Options > Guestbook Generator. Requires the Paged Comments plugin. […]

  17. […] I just came across a WordPress plugin called Paged Comments, which makes your popular entries which contain many comments look cleaner by putting them into different comment pages. The idea sounds pretty cool, as it will make your post look cleaner without endless list of comments, however, If you take a closer look at this plugin, you’ll realize that it creates lots of duplicate content. […]

  18. […] Paged Comments ?????????????????? […]

  19. Martino says:

    Thanks for this! I will be using this pretty soon. By the way you have a really cool and clean site. Nice.

  20. […] Paged Comments ?????????????????? […]

  21. Rob says:

    HOW DO I REMOVE THE PAGE NUMBERING??? YOUR COMMENTS DONT SHOW THE PAGE NUMBERING PLEASE HELP!

  22. […] Paged Comments has saved of my pages with heavy discussion from crashing browsers […]

  23. Foehammer says:

    Unfortunately, your great plugin breaks

    Paged Comments plugin
    http://keyvan.net/code/paged-comments/

    Info:
    http://forums.lesterchan.net/index.php/topic,566.20.html

    I’m hoping you might issue a fix so these two plugins become compatible.

  24. […] If you analyze the pages created by paged comments plugin (for exemple), You’ll see that almost all content in all pages generated are exactly the same. […]

  25. ovidiu says:

    I have a small problem with the plugin: guestbook generator. it is supposed to work with your plugin too, here is a link to my 2 comments on that authors homepage, maybe you can help too:

    WordPress Guestbook Generator

    thx a lot
    Ovidiu

  26. Keyvan says:

    Thanks for the comments. I’m sorry it’s taking me a while to respond. I’m going to be testing the plugin a little more tomorrow so I’ll let you know if I find anything. Expect another release soon.

  27. ovidiu says:

    I also have a small problem with your plugin in conjunction with the hemingwayEx theme. I also posted on the themes authors homepage:

    hemingwayEx theme post

    what happens can be seen here: http://www.pensiunea-nora.ro/guestbook/

    The newest comment is on top, so sorting is ok, exactly liek I want it, but the newest comment has the comment id 1 so every time a newer comment is posted, it gets id 1 which seems strange to me but I don’t know where the problem lies, with the used plugins or with the theme… because the theme also has an option for comment sorting…

    maybe you can help me sort this out?

  28. Keyvan says:

    Hi all,

    You can download the new release now.

    2.6.4 Changes:

    • Global variables made available to eval()ed template.

    2.6.3 Changes:

    • Pretty permalink PATH_INFO support: if you get 404s when you enable pretty permalink support in WP, this should fix it. (This is a fix for those who have /index.php/bla/post/ type URLs.)
    • WP-Print compatible: if you were getting the same page loading when you selected the ‘print’ link, it should now work.
    • French language file in the languages directory (thanks Nicolas).
    • Better handling of multi-paged posts: paged comment links now include the page number of the current post/page (thanks Nicolas, again!).
    • Regulus template (thanks Juan!)

    Please let me know if you experience any problems with the new version.

  29. Eric says:

    I don’t know if you are still adding to this plugin but I think it would be a cool feature if the paging links kept the permalink structure. Just an idea! Love the plugin!!

  30. Jermaine says:

    First of all, i think i have to hope to get enough comments to see the pagination 🙂

    Thanks anyway

  31. after installing the paged commentsplugin all I get is:

    Sorry, no posts matched your criteria.

    :/
    any ide what’s going on?

    Im running WP 2.1.1

    ms

  32. Keyvan says:

    ovidiu: I’ll look into that theme if I get the chance. You’ll probably need to create a custom paged comments template for the theme. If you want to attempt this yourself, look at the difference between the default comments.php file bundled with WordPress and the one modified for this plugin.

    Eric: Links to comment pages should retain the permalink structure if you enable fancy URL support in the paged-comments-config.php file. (Look at the URLs for the different pages here.)

    Mateusz: Version 2.6.4 should work for you, just replace paged-comments.php.

  33. awesome Keyvan!
    thanks very much, you saved my life.
    m

  34. […] OK guys – you’ve been commenting too much. 2000 comments on CF and 500 on DMT were forcing server to work beyond it’s capabilities. Thanks to Keyvan Minoukadeh and his Paged Comments plugin we’re ok now. Phew.   […]

  35. ovidiu says:

    but if you also have a look at that guestbook generator plugin, maybe you can confirm what I understood: it seemed that plugin takes my commentform from the theme I am using and then changes and alters it, saves it udner another name and makes it compatible with your plugin…

    maybe I got all that wrong?

  36. […] So, we resolved this by installing Keyvan Minoukadeh’s WordPress Paged Comments Plugin at keyvan.net. Now, only 10 comments are displayed at a time. You can even go to a specific page of comments. We like! […]

  37. Martin says:

    This is a nice plugin. It works really nice.

    Could you tell me what file i should edit in, if i whant to translate it to another language?

    //Martin

  38. Keyvan says:

    Mateusz: Glad it’s working for you now 🙂

    ovidiu: I’ll have a look at that plugin when I have time.

    Martin: Thanks! You can either edit the plugin file itself, paged-comments.php, and replace the english phrases. (That’s the easy method, but it’ll make updates more difficult because you’ll have to edit again for each new update you want to use.) If you know how to use .pot files, the better way is to create a new language file and put it in the languages folder. If your WordPress config has a certain language other than English defined, the new file will be used automatically once you place it in the languages folder. You can download paged-comments.pot. Hope that helps.

  39. ph3s says:

    i’m sorry i have got an error 🙁
    could u help me please

    Fatal error: Call to undefined function: ro_paged_comments_template() in /home/…/wp-content/plugins/paged-comments/paged-comments.php(90) : eval()’d code on line 21

  40. Keyvan says:

    ph3s: Please disable the Reverse Order Comments plugin first. The two plugins are not compatible.

  41. asdf29 says:

    thank you 😉

  42. Anand says:

    Great plugin!

    I finally got it working. I have a question.
    I have 2 pages where you can leave comments, but they have different layouts. Is it possible to copy comments-paged.php, rename it and use that file?

  43. […] ?????????? WordPress Paged Comments Plugin 2.6.4 ?? […]

  44. […] Mi próxima meta será ver la factibilidad de poder usar Ajax para los comentarios, cosa de no tener que recargar la página. No se si será posible, dado que uso el plugin Math Comment Spam Protection que controla si un comentario se publica y me evita recibir SPAM y el plugin Paged Comments que pagina los comentarios y los reordena de manera descendente. […]

  45. GregM says:

    Howdy Keyvan,

    Outstanding!

    Just a comparatively minor question/feature request, which I think is straightforward but not quite straightforward enough for me to undertake myself…

    Is there some way to detect whether a user has entered a comment page number which would take them beyond the total number of pages, and return some message to that effect — rather than just reproducing the highest available comments page, as happens currently? I.e., at the moment, if I ask for comment page number 1234567890 on this post, I just see the highest available comment page (currently 45). Would there be a way to return something (probably via the template) saying “Sorry, we don’t have that many comments pages”, or something to that effect? Something like a call to check whether the value of $_GET[‘cp’] is greater than $num_pages…?

    Many thanks,
    Greg

  46. […] ????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????? ????????? WP AJAX Edit Comments?AJAX???????????????????????????????????????????? WP-UserOnline???????????????????? Paged Comments???????????????????????????????????????????? FireStats? ???????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????? Akismet?wp???????????????????????????????????????????????????????wp???key???????????????????????????????????? […]

  47. GregM says:

    And another question, Keyvan!

    Could you point us in the direction of the search-comments plugin you use just below the comment page navigation? I’ve had a look around, and the only references I can find to it seem to lead to a spamified domain. Is it still being developed, or has it become an orphan? (No mention in the WP plugins databases at wordpress.org or wp-plugins.net…)

    All the best,
    Greg

  48. Keyvan says:

    Greg: Regarding the comment page number issue, I’ll consider adding that as an option (or maybe make it the default behaviour) in a future version. For the time being you should be able to check if the requested comment page ($_GET[‘cp’]) is greater than the actual comment page number displayed:

    if ($_GET['cp'] > $paged_comments->pager->get_current_page()) { 
    /* $_GET['cp'] is an invalid page number */ }

    The problem is, this information is only retrieved and made available when WordPress comes to process the comments. (So the code above should be in comments-paged.php.) By that time WordPress will have already outputted the post’s content. In a future version I’m going to make functions available that will calculate paging information at any stage. So, for example, you could serve up a 404 if you discover the requested comment page is invalid.

    Regarding the search plugin, you’re right, it does appear to have disappeared. I’ll consider bundling it with the next version as a separate plugin.

21 Trackbacks

  1. By ????Paged Threaded Comments | FIAB on 23 June 2007 at 11:17 am

    […] « ??paged-comments 6 ?23rd ????Paged Threaded Comments 1 Views · No Comments ??????PagedComments???? […]

  2. By ????? » ????? on 23 June 2007 at 10:10 pm

    […] ???????????ajax-comment-reply,?????????paged-comment???????????????ajax???????????? […]

  3. […] Paged Comments […]

  4. […] There is built-in (but optional) support for my favourite plugins—Akismet, Custom Comments, Get Recent Comments, Gravatar and Paged Comments. […]

  5. By Kinoute Cassini Blog » Twitter & Markdown on 24 June 2007 at 11:05 pm

    […] J’ai trouvé AJAX Paged Comments mais l’auteur ne partage pas son code. Il y a bien Paged Comments mais il n’est pas AJAX-Style et impose donc un rechargement complet de la page, pas très esthétique tout ça. […]

  6. […] 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. […] Paged Comments – What’s great with this plugin, you ask? This breaks down comments into a number of pages, which is perfect if you have, let’s say, a hundred comments in a particular post. By Keyvan Minoukadeh. […]

  8. By ??????????? at ???? on 6 July 2007 at 9:51 am

    […] ???????? ??????(????)?????????????(trackback)?? […]

  9. […] L’altro giorno ho fatto una piccola modifica al mio blog in modo da renderlo più efficiente: ho installato un plugin che dividesse in pagine i commenti e ho modificato il foglio di stile in modo da evidenziare con un solo colpo d’occhio il commento dell’autore del blog (ovvero me) da quelli di tutti gli altri. Questa esigenza è nata dal fatto che alcuni miei articoli hanno centinaia di commenti (come Xbox 360 vs PlayStation 3 con 555 commenti e 999 inviti Joost tutti per voi con 166) che inficiavano notevolmente le prestazioni del sito durante il caricamento della pagina. Inoltre, tra tutti questi articoli, era necessario effettuare un highlight dei commenti dell’autore, in modo da evidenziare, tra le centinaia di commenti, le mie risposte. Il primo passo è stato quello di installare la versione 2.6.2 del plugin per WordPress Paged Comments. Il suo funzionamento è veramente semplice, quello che forse è più complicato è la procedura per adattare il plugin al template del proprio sito. […]

  10. […] This plugin is a combination of Brian’s Threaded Comments and Keyvan’s Paged Comments Plugin, based on the work of Trustin Lee. […]

  11. […] Generates a guestbook for WordPress blogs. Once activated, click on Options > Guestbook Generator. Requires the Paged Comments plugin. […]

  12. By Paged Comments Can Create Duplicate Content? on 12 July 2007 at 6:38 pm

    […] I just came across a WordPress plugin called Paged Comments, which makes your popular entries which contain many comments look cleaner by putting them into different comment pages. The idea sounds pretty cool, as it will make your post look cleaner without endless list of comments, however, If you take a closer look at this plugin, you’ll realize that it creates lots of duplicate content. […]

  13. By ?? » ?????????? on 16 July 2007 at 2:52 pm

    […] Paged Comments ?????????????????? […]

  14. By ????? ????? | xunii.com ????? on 17 July 2007 at 10:59 am

    […] Paged Comments ?????????????????? […]

  15. By 12 WordPress Plug-ins I can’t sleep without on 19 July 2007 at 5:21 pm

    […] Paged Comments has saved of my pages with heavy discussion from crashing browsers […]

  16. By Don’t use paged comments | The Blog School on 21 July 2007 at 5:07 pm

    […] If you analyze the pages created by paged comments plugin (for exemple), You’ll see that almost all content in all pages generated are exactly the same. […]

  17. […] OK guys – you’ve been commenting too much. 2000 comments on CF and 500 on DMT were forcing server to work beyond it’s capabilities. Thanks to Keyvan Minoukadeh and his Paged Comments plugin we’re ok now. Phew.   […]

  18. By Managing comments | Apple TV Hacks on 2 August 2007 at 9:09 pm

    […] So, we resolved this by installing Keyvan Minoukadeh’s WordPress Paged Comments Plugin at keyvan.net. Now, only 10 comments are displayed at a time. You can even go to a specific page of comments. We like! […]

  19. […] ?????????? WordPress Paged Comments Plugin 2.6.4 ?? […]

  20. […] Mi próxima meta será ver la factibilidad de poder usar Ajax para los comentarios, cosa de no tener que recargar la página. No se si será posible, dado que uso el plugin Math Comment Spam Protection que controla si un comentario se publica y me evita recibir SPAM y el plugin Paged Comments que pagina los comentarios y los reordena de manera descendente. […]

  21. By PJBLOG?Wordpres??? - ???? on 8 August 2007 at 8:36 am

    […] ????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????? ????????? WP AJAX Edit Comments?AJAX???????????????????????????????????????????? WP-UserOnline???????????????????? Paged Comments???????????????????????????????????????????? FireStats? ???????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????? Akismet?wp???????????????????????????????????????????????????????wp???key???????????????????????????????????? […]