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
- Version 2.9.1 (2008-12-23) (zip file)
- View code at the WP Plugin Repository
Work in progress: Ajax-style Paged Comments (no download yet – AJAX support coming in version 3)
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.
- 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
- 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:
- White Town guestbook
- Stuff White People Like
- Thank You Stephen Colbert (not online anymore, but used to have over 60,000 comments!)
- Playstation
- eBay
Questions?
- Read the FAQ and if it’s not answered…
- Leave a comment or email: keyvan (at) k1m.com
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
42 Comments
[…] zur Theorie. Eines vorneweg – alteingesessene Plugins wie PagedComments, welches auch die Navigation im Screenshot rechts hier im Blog erstellt hat, kann diese Funktion […]
I am trying to use your paged comments plug in but having issues.
When I activate it the comment text enter area becomes way too wide. Any ideas.
jason
I’ve got an issue about the plugin :
Links such as /?p=123#comment-1234 are broken when they link to a comment on page 2,3 etc.
I’ve read all kinds of documentation.
I’ve tried tweaking the config of paged_comments.
I’ve enabled and disabled permalinks in different modes.
I’ve tried to add an add_rewrite_rule.
Everything failed.
Any help ?
[…] Paginarea comentariilor. S? afi?ezi 180 comentarii pe o singur? pagin? nu e doar un efort pentru browser, ci ?i pentru sistemul pe care ruleaz? blogul. De aceea e recomandat s? le pagina?i, mai ales dac? ave?i mai mult de 50 comentarii per post. […]
Hi there – Is there a reason the page listing sits in my last commenter’s comment? In other words, the “page 3 of 3…” is between my last commenter’s name and their comment. What should I do?
[…] you notice that some plugins, such as Keyvan Minoukadeh’s Paged Comments plugin, are not operating correctly, then ensure that your custom permalinks have a trailing slash […]
Keyan – did you found a solution for this bug:
I agree with you, this is a bug. Paged comments is currently whiping the pre-filled info on the comment form Anyone can search for a fix? Sadly I’m not a php coder.
help – would be really great
thanx for your work!!!!!!!!! anyhow
cheers thomas
[…] Paged Comments (plugin) – Technically, not a performance plugin. However, paged comments will reduce page load time for articles which attract hundreds of comments. Example post with 382 comments. […]
[…] Paged Comments The Name says it all. It Breaks down comments into a number of pages. […]
Am I supposed to erase my comments page, and just add the files from the comments-paged to my themes comment feature? Do I just copy everything from yours to mine?
[…] sure you’ve all been to a post which has hundreds of comments and it takes forever to load. Paginate your comments once there’s too many to load on a single […]
Love the plugin but i would like to customize the look. i can go into the code and adapt if but i think you need to have an option much like the wordpress page navi. even better, if a user has it installed pull the formatting from those settings to keep things consistent.
hello, does not work with wordpress 2.7
Please, can you verify?
thanks.
WordPress 2.7
WP 2.7 comes with comment paging built in. So there is a good chance the plugin will not work, and probably won’t be needed if you’re already using WP 2.7.
no it doesn’t work with WordPress 2.7
Hi, the comments paged of wordpress 2.7 not work on many themes, their Paged Comments plugin is easy to configure and the best option.
Please update, thank you.
I hope that you can continue the Paged-Comments plugin for us. 🙂
Although the WordPress 2.7 has the built-in paged comments function, I found that will load all comments belong to a post-id into memory (select comments without limit). I have a guest-book contain over 35000+ comments, thus after upgrading to 2.7 I get memory-allocate problem in sometime.
Using paged-comments I never got the problem.
Besides, the WordPress 2.7 built-in paged-comments sucks. If I have 15 comments, and every 10 comments a page, the 1st comment page will only display 5 comments, not 10 comments. Your paged-comments has no such problem, so please go ahead to develop the next version for us, thank you.
I agree with Johnson.Wang!!!
Please, continue develop this cool plugin.
I have tested it on 2.7 and it works!
It works somewhat on WP 2.7, but the navigation seems broken… can we hope for a fix?
Hi, I´m using your plugin too. It works greak! but in WP 2.7 navigation doesn´t work. I really need it to work. Thanks a lot!
Hey,
The plugin is simply great, but I think there is a bug in it.
I am running wp 2.7 and, there seems to be a problem with pagination of posts using pretty permalinks.
Is there any way to modify the comment page links ?
Regards
^^^
same here. pagenavigation doesn’t work with wp 2.7 and permalinks.
Hey Keyvan. I had been using your plugin on my site for a while now and was really happy with the way it worked and how configurable it was. After upgrading to 2.7, as I’m sure you already know, the permalinks/pagination got screwed up. It did continue to page the comments it seems, but when I clicked on a page number it wouldn’t take me to it.
I noticed in a previous comment you said that 2.7 already has paged comments so you would discontinue this plugin, but that would be a mistake given that 2.7’s paged comments are nowhere near as flexible or powerful as your plugin allows. I believe many of us would at least appreciate it if you could tell us what you think is wrong with the plugin so we could try and fix it ourselves. I imagine it has something to do with it using permalinks similar to 2.7’s paged comments permalinks, maybe 2.7 kept wanting to direct the permalinks instead of allowing the plugin to?
Thanks I really appreciate the work you have done.
I was correct in my previous comment and have now found the solution to this problem.
For those of you wanting to get this plugin to work correctly in WordPress 2.7, check this out [ http://www.blaenkdenum.com/get-paged-comments-plugin-to-work-in-wordpress-27/ ].
Thanks again Keyvan for this plugin!
Blaenk: Thanks a lot for that! I’m glad you’ve found a workaround. To be honest, I haven’t even looked at WP 2.7 yet, so I have no idea what conflicts. Seeing as there is still interest though, I’m going to release another version for 2.7. I’d also like to allow users to keep the existing permalinks (without having to rename the path segment to something else), but I won’t know if that’s possible until I’ve had a chance to look at the code.
I’ll post again about this in the next few days. Thanks again.
Keyvan: The only way I see that being possible without also modifying the WordPress core is by adding a much higher priority level to paged_comments_fancy_url, maybe something like -10 haha but even then I wouldn’t be sure. I’ll try it out right now. Nope it didn’t seem to work. Is the init hook the most earliest hook when loading a page?
It seems to me like modifying the core is the only other way to go. The comment-page redirection/matching occurs in the following core files of a vanilla 2.7 install:
wp-includes\canonical.php [Lines: 136, 140, 167]
wp-includes\comment-template.php [Lines: 475]
wp-includes\link-template.php [Lines: 1226, 1232, 1340]
wp-includes\rewrite.php [Lines: 1262, 1343, 1368, 1415, 1425]
So I guess modifying the permalink in the plugin is the most convenient way to go. Either way for me it’s not that big of a deal modifying the permalink so I’m fine with it. Thanks again for the plugin! 🙂
Hey Keyvan.
Following Blaenk idea, I found a solution without modifying the url structure. Just changing in 4 files: canonical.php, comment-template.php, link-template.php y rewrite.php (located in wp-includes) the following: comment-page by something similar (eg. commentS-page).
It works great now.
You can see it here: http://www.mazcue.com.ar/plugin-paged-comments-wordpress-27-fix/
Regards!
why some of you prefer to edit the wordpress core files?
Is that a big problem change the url structure of paged comments plugin?
WP 2.7 update
Thanks for the help guys. I’ve just tried it myself and I think the fix for WP 2.7 is simply to remove the 2 calls to url_to_postid() in function paged_comments_fancy_url. This call was there to prevent false positives, but now that WP itself uses the same path segment I’d used in the plugin, the call does actually return the valid post ID where it previously returned false (0).
You can see a visual diff of the changed file. I’ll try and put out a release soon – I’m hoping to use the WP settings available in 2.7 to allow users to override the ones specified in the plugin’s config file.
gt: The URL structure might not be a big deal for new users of the plugin, or even for some existing users, but if your URLs have been indexed/linked to/bookmarked, then changing the URL structure can be a big problem. In fact, it’s probably no accident that the WP developers chose the same comment page identifier I’d used in the plugin – it allows users of the plugin to switch to WP’s comment paging without having to worry about broken URLs.
hey,
I tried the fix, but even with the new version, I think there is still a problem with wordpress post pagination.
I am using permalink structure
http://www.domain.com/%postname%
so my pages have the following link
http://www.domain.com/article-A/1 -> page 1
http://www.domain.com/article-A/2 -> page 2
http://www.domain.com/article-A/3 -> page 3
When this plugin is active, the other pages links don`t seem to work, every link shows me only the first page of article A
What could be the reason ?
Regards
please note that wp’s automatic update will delete the configuration file (at least for me)!
I got the plugin working for my site. The issue is that some of my other plugins don’t work, plugins like Wp-Grins and Ajax Edit Comments. I read through the intro, so am I supposed to copy the things from the comments-paged php file to my comments file of my theme to insure compatibility? Not sure how to get it all compatible with this plugin.
I got another problem:
When i get a “new comment” mail / information and i klick on the link in the mail…i see always the first comment on the page.
===>> i already set “last” in den config, but it stills jumps to the first comment 🙁
Michael: I tested WP 2.7 using a multi-page post with the same permalink structure and had no problems. Are you using WP 2.7? And which version of the plugin are you using?
gt: You’re right, I tested the automatic update and it deleted the config file. I don’t think there’s anything I can do about that other than move the config file out of that folder.
Jim: I haven’t use those plugins. There’s a good chance the plugins are simply not compatible. You might get them all working by tweaking files, but I can’t really help with that.
Heiko: Which version of WordPress are you using?
@ keyvan
that is a common issue of WP’s automatic update.
If you have time for a more complex solution, you can provide a simple administrative configuration panel which stores settings in the wordpress db, so we will be able even to localize it!
Cr*p, I was afraid of that. I will try taking a look around the files, weird that they wouldnt be compatible since they’re both popular, but this is the one I need more. Thanks for the feedback.
@HEIKO – I noticed your site uses the ajax edit comments and the paged comments plugin without problems. Can you tell me how you got these two plugins working together? It would save me alot of trouble. Thank you in advance.
@Keyvan
One more question popped to mind, I saw that you use search comment plugin, but when I tried using google to find it, it did not come up with anything. Can you give the link to it, or where you can get it?
[…] overload query ke database pada artikel yang memiliki banyak komentar. Aku memakai plugin Paged Comments 2.9.1 yang sebelumnya hanya aku pakai untuk page Guestbook. Yang bikin aku pusing, split antara komentar […]
Still having trouble resizing the comment bar…. looked but I dont see height or width adjustment in the plugin settings. Sorry for all the questions, as I am sort of new to all this. Thank you
I have a problem with this plugin, maybe somebody could assist me (I really searched a lot for a solution):
Every comment on my blog has a permalink like “blog.com/#comment-(commentnumber)”.
When I install the plugin all the comments have a structure like “blog.com/page(number)/#comment-(commentnumber)”.
The problem now is that all previous links to comments do not work anymore.
Is there a solution to make the links work?
Thaks a lot.
Eddie
Is it possible to rename “Show all”?
Is it right, that the possibility to reply to a comment for every user is disabled by the paged-comments plugin?
I am using wp2.7 and the latest paged-comments plugin (2.9.1) and the only place where I am able to reply to a comment is on my dashboard or administration for comments… then listed as normal comment and NOT as reply…
So the native threaded comments from wordpress are disabled… are you gonna fix this? 🙂
Well – is there allready a fix for the cookie-problem?
I’m using the latest version of paged comments on WP 2.7 and the auto-filling of the comment-form doesn’t seem to work.
[…] Il sito ufficiale del progetto invece è questo: http://keyvan.net/code/paged-comments/ […]
Hi, the plugin works fine in my blog.
Do you know how I can add the page number of the comments in the title tag?
Thanks
Hi Keyvan,
Just a quick note from a long-time user of your plugin (now drawn away to the dark side of WP’s built-in paging, though…)…
In case it might be of any use in terms of building up handling for threading and the funky case of numbering when threading is enabled, I’ve just today released a plugin that provides numbering for WP’s built-in threading, and a trac submission to fix a page counting bug in the WordPress core (report number 8973). Here’s the counting plugin:
Greg’s Threaded Comment Numbering
All the best,
Greg
Just like Chris, I’m using the latest version of paged comments on WP 2.7 and the auto-filling of the comment-form doesn’t work. Version 2.6.4 works fine…
hi, i would like to suggest to include an option in the admin panel if you would like to add a nofollow and noindex attribute to the pagination links, to avoid duplicate contents for SEO purposes 😀
just a suggestion. 😀 More power to this plugin keyvan! 🙂
I’m using 2.71 with pixeled 1.9 themes, i got this error when i try to use this plugin. Can u help me?thx in advanced.
Fatal error: Call to a member function num_pages() on a non-object in /***/wp-content/themes/pixeled-1.9/comments.php on line 232
8 Trackbacks
[…] zur Theorie. Eines vorneweg – alteingesessene Plugins wie PagedComments, welches auch die Navigation im Screenshot rechts hier im Blog erstellt hat, kann diese Funktion […]
[…] Paginarea comentariilor. S? afi?ezi 180 comentarii pe o singur? pagin? nu e doar un efort pentru browser, ci ?i pentru sistemul pe care ruleaz? blogul. De aceea e recomandat s? le pagina?i, mai ales dac? ave?i mai mult de 50 comentarii per post. […]
[…] you notice that some plugins, such as Keyvan Minoukadeh’s Paged Comments plugin, are not operating correctly, then ensure that your custom permalinks have a trailing slash […]
[…] Paged Comments (plugin) – Technically, not a performance plugin. However, paged comments will reduce page load time for articles which attract hundreds of comments. Example post with 382 comments. […]
[…] Paged Comments The Name says it all. It Breaks down comments into a number of pages. […]
[…] sure you’ve all been to a post which has hundreds of comments and it takes forever to load. Paginate your comments once there’s too many to load on a single […]
[…] overload query ke database pada artikel yang memiliki banyak komentar. Aku memakai plugin Paged Comments 2.9.1 yang sebelumnya hanya aku pakai untuk page Guestbook. Yang bikin aku pusing, split antara komentar […]
[…] Il sito ufficiale del progetto invece è questo: http://keyvan.net/code/paged-comments/ […]