WordPress Paged Comments 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
- Version 2.8 (2008-08-19) (zip file) Release notes
- View code at the WP Plugin Repository
- Work in progress: Ajax-style Paged Comments (no download yet - AJAX support coming in version 3)
Related Downloads
Installation (for Wordpress 2.3+)
If you’re upgrading from a previous version, skip these installation steps and read the upgrade steps.
- Download and extract plugin files to a folder locally.
- Read through and edit paged-comments-config-sample.php to configure, then save the file as paged-comments-config.php.
- Upload the whole paged-comments directory to /wp-content/plugins/. The plugin files should now be in /wp-content/plugins/paged-comments/.
- Enable the plugin through the WordPress admin interface. That’s it!
Optional Steps
- 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:
- White Town guestbook
- Thank You Stephen Colbert (over 60,000 comments!)
- Playstation
- eBay
- Mashable
- TorrentFreak
Questions?
- Read the FAQ and if it’s not answered…
- Leave a comment or email: keyvan (at) k1m.com
Donate
I work on this plugin in my spare time. If you find it useful, please consider donating to help me continue work on the plugin. (This plugin is, and will remain, free software, please only donate if you want to.)
Paid Support
If you run a commercial site and you’re having difficulty setting up paged comments, I now offer paid support. Feel free to get in touch: keyvan (at) k1m.com
[...] Paged Comments [...]
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.
Works in comments popup?
Thanks.
[...] 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 [...]
[...] 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 [...]
[...] 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. [...]
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!
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
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.
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