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

28 Comments

  1. oz says:

    I installed this plugin and works really fine… just two issues…

    1. I don’t see my Yahoo/MSN Style Smileys that commenters use to click and put in their comments.

    2. All images that decorate commenter’s line has disappeared.

    Could you please advise on how I can get 1 & 2 back.

  2. oz says:

    Also, is there a way to tweak the “recent comments” as clicking on the recent comments in the sidebar does not take us to the comment on that page.

  3. Keyvan says:

    Joseph: The new version (2007-01-30) fixes the RSS feed issue. Thanks for raising this.

    Anja: I’m not sure why you have an issue with the post preview. I upgraded my WP testbed setup to 2.0.7 and didn’t have a problem – it correctly displayed the post and the comment page numbers too in the preview. I then upgraded to 2.1 and it still appears to work fine. Anyone else experience a problem with the post preview misbehaving while the Paged Comments plugin is active?

    Cristian: If I get some time I’ll have a look, but unfortunately I can’t look into every compatibility issue between this and other plugins. It’s hard enough keeping up with WordPress developments. ūüôā

    Ajay: It appears to work fine on WP 2.1. I upgraded my WP2 testbed to the latest version and haven’t noticed any problems. Although I haven’t tested extensively.

    Axel: I don’t have time right now to create custom templates for other themes. It might work fine with the bundled ‘default’ template, and if not you should be able to move the plugin code from the default template to your theme’s template.

    General Plugin Compatibility Issues
    If it’s relatively easy to make this plugin compatible with another plugin (especially one that you feel users of this plugin are likely to install alongside it), then please submit patches and I’ll consider them for the next release.
    There are too many plugins for me to look into, so it’s likely that when I’m working on this I’ll be accommodating plugins/features that I use rather than ones you/others use.

  4. kretzschmar says:

    Hi,
    i needed a german version of your plugin. Therefore i localized it (gettext). Feel free to use my code.

    Ich habe das Plugin auf deutsch √ľbersetzt. Es ist eine vollst√§ndige Lokalisation, sodass die Strings auf englischen Blogs in Englisch und auf deutschen Blogs in Deutsch erscheinen.

    Paged-Comments (german)

  5. Gi says:

    Hi, I installed your plugin in my blog, was working fine in all post except this one (http://www.parachicas.net/celebrities/2006/07/%c2%bfcuanto-miden-las-famosas-mas-bajitas/) showing this error:

    Warning: sprintf() [function.sprintf]: Too few arguments in /domains/mydomain.net/public_html/wp-content/plugins/paged-comments.php on line 696

    Can you help me?

  6. patung says:

    Kevyan,

    It works fine for me on 2.1 except when I try have config like this:

    $paged_comments->all_posts = false;
    $paged_comments->all_pages = false;
    $paged_comments->per_page = 10;
    $paged_comments->ordering = ‘ASC’;
    $paged_comments->fill_last_page = false;
    $paged_comments->page_range = 11;
    $paged_comments->fancy_url = true;
    $paged_comments->show_all_option = true;
    $paged_comments->show_all_ordering = ‘ASC’;
    $paged_comments->default_page = ‘auto’;

    I add a custom field to a post with more than 10 comments, ‘paged_comments’ with the value ‘on’, but it doesn’t paginate, the paged-comments.php file is not getting called.

  7. Gi says:

    I forgot to tell you that this is happening because this post has more than 150 comments. Where is the limit in the config…

  8. Keyvan says:

    kretzschmar: Thanks! I’ll take a look and link to it soon.
    Do you know if this will cause problems for people without the gettext package? (I have no experience with gettext.)

    Gi: Thanks for telling me about this. The percent (%) symbols in your URL are causing the problem. I’ve just updated the plugin to handle URLs with the percent symbol in. Please try with the latest release.

    patung: I think WP2.1 requires the use of a different function for retrieving custom fields. The latest release should fix the problem. Please try and let me know.

    To upgrade, simply replace paged-comments.php with the one in the latest release (no need to touch the config file).

  9. patung says:

    Hi Kevyan, sorry, I can’t imagine why but it still doesn’t work. The custom field is definitely there, Key – paged_comments, Value – on.

  10. […] ????, ??? comment ?????????, ????????, ????? Paged Comments, ???????, ?????????. ???????? blog ????, ?????, ? browser ??????, ????????? phpBB ?? SMF ?????????… […]

  11. patung says:

    No wait, I’m an idiot, it does work. Thankyou Kevyan.

  12. kretzschmar says:

    Keyvan,
    gettext is supported from wordpress “out of the box”. If you don’t set your locale in wp-config.php (wp-lang) it uses the default string in your plugin file. So no problems at all. Try using my plugin and you will see.
    I use it in my theme dKret without problems.

  13. kretzschmar says:

    Keyvan:
    I just updated my Plugin with your new code. There are only a few (two or three) strings in your package. Why don’t you just use my code?

  14. Keyvan says:

    patung: Glad to hear it’s working.

    kretzschmar: Thanks, I’ll include it in the next release.

  15. kretzschmar says:

    Keyvan: I made one last change to the load_plugin_textdomain function. Now the path isn’t hardcoded anymore, so no problems if someone changes the directory name.
    Download it on my site.

    http://diekretzschmars.de/2007/paged-comments-deutsch/

  16. […] WordPress Paged Comments Plugin es, como su nombre indica, un paginador de comentarios. Ideal si tienes varias entradas en el blog con cientos de comentarios y no deseas cerrarlos. […]

  17. Mike says:

    Well i tried it with wp 2.1, at first it did not work, so I tinkered a bit and manually renamed the template tag. Also for some reason it wouldent read the config file, so i added the config in the actual plugin.

    It works-ish, for some reason, no matter how I config, it only shows 5 comments in accending order per page.

  18. Mike says:

    I meant 4. To bugtest I just echo’d out the $comment DB query which shows as:

    SELECT * FROM wp_comments WHERE comment_post_ID = '29' AND comment_approved = '1' ORDER BY comment_date DESC LIMIT 0, 4

    I don’t know why $limit_clause is returning 4…

  19. Mike says:

    Ahh, I just changed the config from desc to asc ($paged_comments->ordering = 'ASC';) and it worked. I know what the problem was, it was because in the DESC mode the first page was the last page and it dident show the full 10 entries. Confusing but its ok.

  20. tracy says:

    I am trying to get your plugin to work for on my guestbook page. I have 106 comments there.

    I have activated the plugin, I have the 3 files where they need to be…
    Here are my settings in the config file
    $paged_comments->all_posts = true;
    $paged_comments->all_pages = true;
    $paged_comments->per_page = 10;
    $paged_comments->ordering = ‘DESC’;
    $paged_comments->fill_last_page = true;
    $paged_comments->page_range = 11;
    $paged_comments->fancy_url = false;
    $paged_comments->show_all_option = true;
    $paged_comments->show_all_ordering = ‘ASC’;
    $paged_comments->default_page = ‘last’;
    I also have a custome field made on that page key, paged-comments value, on.

    WHat the heck do I have wrong?
    Thanks for your help

  21. Perfect, it functioned perfectly, I liked very, was organized the site after this plugin, congratulations! It confers as it was http://hunterxhunter.com.br/2007/?page_id=348

  22. […] 8. Paged Comments WordPress Paged Comments is a plugin for WordPress 1.5 and 2.0 to allow comment paging. Useful for those popular blog entries receiving many comments, or a simple guestbook page within WordPress. […]

  23. […] Paged Comments 2.5 (2007-02-02) ?????????????????? ?????Gmail Invitation […]

  24. […] 1) First get Paged-Comments version 2.5 […]

  25. […] A WordPress flaw: no paged comments By Tim A snag with the most wonderful WordPress is that comments to a post are not broken down into pages. With over eighty comments and climbing fast, this post on slow Outlook 2007 is getting slow to load. Fitting, I guess, but I’d rather it performed better. I looked in vain for a WordPress option to split the comments into pages. I did find this plugin, but although it works it looks bad with the theme I’m using. I suppose a few hours hacking would fix it. I reckon a paging option should be built into WordPress as it will always be a problem on heavily commented posts. […]

  26. rawk says:

    Dear Keyvan,

    I installed your great plugin and it works beautifully. However, there is an incompatibility with the Gengo plugin (http://jamietalbot.com/wp-hacks/gengo/) which allows WordPress to handle multiple language versions of the same post.

    The incompatibility arises when turning on $paged_comments->fancy_url. It seems to be an issue with ordering of plugin loading, in fact gengo appends a language code to the fancy url, eg. server.com/mypost/en/ and when enabling fancy urls to your plugin, i get something like server.com/mypost/en/comments/en/ which gives page not found.

    Is this fixable within your plugin, or should it be fixed in gengo?

    Thank you for your kind attention
    All the best,

  27. […] Keyvan Minoukadeh ¬Ľ WordPress Paged Comments Plugin […]

  28. Keyvan says:

    Thanks for the comments everyone, I’ll get to them all in the next few days.

  29. toph says:

    Does this work with the AJAX comments plugin?

  30. […] Keyvan Minoukadeh ¬Ľ WordPress Paged Comments Plugin Plugin de WordPress para mostrar los comentarios por p√°ginas, con o sin Ajax (tags: wordpress plugin plugins ajax comments pages paged wp) […]

  31. […] Paginate comments so there is, say, 25 comments per page. […]

  32. […] WordPress ?????????????????????????????????? ????????????? ?Paged Comments Plugin? ?????????? Keyvan Minoukadeh? : Paged Comments Plugin ????? : WordPress ????????????? Paged Comments Plugin ??????? […]

  33. tres says:

    i never got this to work properly, maybe because of my poor php skills. anyways.

    is there any way an install/uninstall of this plugin could disable comments on pages completely? i deactivated and rid of everything to re-install and now pages can’t be commented at all …

  34. […] 8. Paged Comments WordPress Paged Comments is a plugin for WordPress 1.5 and 2.0 to allow comment paging. Useful for those popular blog entries receiving many comments, or a simple guestbook page within WordPress. […]

  35. […] Hatte ich schonmal drin, dann aber wieder deaktiviert: das Plugin Paged Comments, welcches das Unterteilen von Kommentaren in Unterseiten ermöglicht. Aus SEO Perspektive zwar nicht ideal, da es jeweils auch den Artikel selbst auf weiteren Unterseiten darstellt & keine individuellen Titel vergeben können. Aber ich wollte trotzdem einfach mal schauen, wie Google damit umgeht. […]

  36. […] Paged Comments ?????????????????????? ????????????????????????????? […]

  37. sahas says:

    Hey I noticed your paged comments links are nice and clean. They appear as “comment-page-#” but mine appear as the id page number links. What change do i need to make to fix this?

  38. Keyvan says:

    A new release will be coming soon. I’ve just had a fix submitted for those of you experiencing the eval error. Edit paged-comments.php and replace the last few lines of instructions with these:

    
    if (strpos($file_contents, 'paged_comments_template()') === false) {
      set_include_path(TEMPLATEPATH);
      $file_contents = str_replace('comments_template()', 'paged_comments_template()', $file_contents);
      $file_contents = str_replace(''.trim($file_contents));
      restore_include_path();
      exit;
    }
    

    Thanks to Alexey G for the fix.

  39. Keyvan says:

    sahas: Enable the fancy_url option to get the comment-page-xx style links.

  40. […] Paginazione dei commenti Nel mio blog ho alcuni articoli con centinaia di commenti, sto cercando un plugin che ne permetta la paginazione (dei soli commenti). Ho provato con questo ma non sono riuscito a farlo funzionare, qualcuno sa cosa consigliarmi? Grazie! __________________ Google Maps, Google AdSense, PHP, phpBB ed ecologia! […]

  41. Danna says:

    i’m always getting errors whenever i install this… ūüôĀ

    i’m using wordpress version 2.1.2
    i’m also using permalinks…
    i also edited the fancy url part of the paged-comments-config.php and set it to true..
    if you go to a post, you’ll see that it’s working. you’ll see the comments and the number of pages the comments were divided to .
    but how come whenever i decide to go to another page of comments {ex. the 3rd page}, a ‘Cannot Find Server’ or ‘Not Found’ page comes out?

  42. […] Paged Comments v2.5 (2007-01-11) by Keyvan Minoukadeh […]

  43. […] 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. […]

  44. […] Se analisarmos as p√°ginas geradas atrav√©s do plugin paged comment, por exemplo, notaremos que praticamente tudo √© id√™ntico, a √ļnica coisa que muda s√£o os textos dos coment√°rios, mas em geral, esses s√£o a menor parte do conte√ļdo (em n√ļmero de palavras). […]

  45. […] Paged Comments 2.5 (2006-12-07) Breaks down comments into a number of pages […]

  46. Jason B says:

    I must be using your plugin wrong because I cant seem to get it to work on my site. I downloaded the files, renamed the sample file. Uploaded to the plugins folder. Uploaded to theme folder, activated plugin and nothing.

    Any ideas?

  47. […] Paged Comments This plugin will allow you to specify how many comments per-post can appear on the page at a time. If you receive tons of comments daily or just have a few popular posts that have hundreds of comments on them, you know why this is so awesome. It will cut down load times and organize everything just the way you want it.. From number of comments per-post to ascending to descending the order. To see this in action please visit one of my more popular posts here. […]

22 Trackbacks

  1. By Wordpress comments at Dennys’ blog on 3 February 2007 at 2:07 am

    […] ????, ??? comment ?????????, ????????, ????? Paged Comments, ???????, ?????????. ???????? blog ????, ?????, ? browser ??????, ????????? phpBB ?? SMF ?????????… […]

  2. […] WordPress Paged Comments Plugin es, como su nombre indica, un paginador de comentarios. Ideal si tienes varias entradas en el blog con cientos de comentarios y no deseas cerrarlos. […]

  3. […] 8. Paged Comments WordPress Paged Comments is a plugin for WordPress 1.5 and 2.0 to allow comment paging. Useful for those popular blog entries receiving many comments, or a simple guestbook page within WordPress. […]

  4. By ????? : Blog Archive : ?????plugins on 18 February 2007 at 12:53 pm

    […] Paged Comments 2.5 (2007-02-02) ?????????????????? ?????Gmail Invitation […]

  5. […] 1) First get Paged-Comments version 2.5 […]

  6. […] A WordPress flaw: no paged comments By Tim A snag with the most wonderful WordPress is that comments to a post are not broken down into pages. With over eighty comments and climbing fast, this post on slow Outlook 2007 is getting slow to load. Fitting, I guess, but I’d rather it performed better. I looked in vain for a WordPress option to split the comments into pages. I did find this plugin, but although it works it looks bad with the theme I’m using. I suppose a few hours hacking would fix it. I reckon a paging option should be built into WordPress as it will always be a problem on heavily commented posts. […]

  7. By wehoo.se » Interna l√§nkar on 21 February 2007 at 4:43 pm

    […] Keyvan Minoukadeh ¬Ľ WordPress Paged Comments Plugin […]

  8. By links for 2007-02-20 en newdisco on 25 February 2007 at 3:54 am

    […] Keyvan Minoukadeh ¬Ľ WordPress Paged Comments Plugin Plugin de WordPress para mostrar los comentarios por p√°ginas, con o sin Ajax (tags: wordpress plugin plugins ajax comments pages paged wp) […]

  9. By Noscope | Designing Cachable Wordpress Sites on 26 February 2007 at 8:52 pm

    […] Paginate comments so there is, say, 25 comments per page. […]

  10. By PARADISE » Blog Archive » Paged Comments Plugin on 27 February 2007 at 1:39 pm

    […] WordPress ?????????????????????????????????? ????????????? ?Paged Comments Plugin? ?????????? Keyvan Minoukadeh? : Paged Comments Plugin ????? : WordPress ????????????? Paged Comments Plugin ??????? […]

  11. By 20 Good Wordpress Plugins To be Used on 1 March 2007 at 8:26 am

    […] 8. Paged Comments WordPress Paged Comments is a plugin for WordPress 1.5 and 2.0 to allow comment paging. Useful for those popular blog entries receiving many comments, or a simple guestbook page within WordPress. […]

  12. […] Hatte ich schonmal drin, dann aber wieder deaktiviert: das Plugin Paged Comments, welcches das Unterteilen von Kommentaren in Unterseiten ermöglicht. Aus SEO Perspektive zwar nicht ideal, da es jeweils auch den Artikel selbst auf weiteren Unterseiten darstellt & keine individuellen Titel vergeben können. Aber ich wollte trotzdem einfach mal schauen, wie Google damit umgeht. […]

  13. […] Paged Comments ?????????????????????? ????????????????????????????? […]

  14. […] Paged Comments […]

  15. […] Paged Comments […]

  16. By |► Paginazione dei commenti on 16 March 2007 at 9:29 am

    […] Paginazione dei commenti Nel mio blog ho alcuni articoli con centinaia di commenti, sto cercando un plugin che ne permetta la paginazione (dei soli commenti). Ho provato con questo ma non sono riuscito a farlo funzionare, qualcuno sa cosa consigliarmi? Grazie! __________________ Google Maps, Google AdSense, PHP, phpBB ed ecologia! […]

  17. […] Paged Comments v2.5 (2007-01-11) by Keyvan Minoukadeh […]

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

  19. By Bruno Alves » Don’t use paged comments on 21 March 2007 at 4:47 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. […]

  20. […] Se analisarmos as p√°ginas geradas atrav√©s do plugin paged comment, por exemplo, notaremos que praticamente tudo √© id√™ntico, a √ļnica coisa que muda s√£o os textos dos coment√°rios, mas em geral, esses s√£o a menor parte do conte√ļdo (em n√ļmero de palavras). […]

  21. By pascal-berkhahn.de » Meine benutzten Plugins on 25 March 2007 at 2:02 pm

    […] Paged Comments 2.5 (2006-12-07) Breaks down comments into a number of pages […]

  22. […] Paged Comments This plugin will allow you to specify how many comments per-post can appear on the page at a time. If you receive tons of comments daily or just have a few popular posts that have hundreds of comments on them, you know why this is so awesome. It will cut down load times and organize everything just the way you want it.. From number of comments per-post to ascending to descending the order. To see this in action please visit one of my more popular posts here. […]