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
40 Comments
[…] and normally not visible, even through the admin interface. I’ve also installed the Paged Comments plugin by Keyvan Minoukadeh. This plugin is different from the above p […]
[…] very day, I decided my Guestbook was getting a little lengthy. I found a great new plugin Paged Comments. WordPress Paged Comments is a plugin for WordPress 1.5 to allow comment paging. Usef […]
[…] ???? ????? ???? ?????? ?? ???. – ??: WordPress Paged Comments Plugin -?? * ???? ??????: redal […]
Excellant plugin! I have a post that has over 500 comments and is such a pain on my server when it loads. This plugin has helped me out so much 🙂
Great plugin, thanks a lot for your work!
thanx!
I’m afraid I’m pretty computer-illiterate. I installed this plug-in, and it’s working great; except that where I used to have numbered comments, since I installed this plug-in there’s a bullet and then a number. Also, the bullet and number now appear above the comment, rather than to the side of the comment as on a normal html ordered list.
If you could suggest what I could do to use your plug-in, but also to get rid of the bullet and put the number back on the same level as the start of the comment, I’d appreciate it. Thanks!
I’m a little lost here…I’m using wp 1.5.1.3 and I’m looking in the comments template for my theme…but I can’t figure out where I’m supposed to replace the code. I didn’t find anything like “comments_template()” in the file…where am I supposed to make the change? :\
Also, how would I use this as a guestbook?
Thanks.
Hi Steph,
You shouldn’t be editing the comments template itself, simply pointing to the alternative comments template (wp-paged-comments.php) provided with the plugin.
You should have a folder called themes within the wp-content folder of your WordPress (WP) installation. Inside you’ll see further folders with names corresponding to the themes available to your WP site. Find the theme currently active on your site and inside the folder you’ll find the template files you’ll need to edit. These differ from theme to theme, some themes include single.php or page.php template files which you should edit, but if you can’t see these you should open all the PHP files within your theme folder and search for the comments_template() method call. Replace every instance of the method call as described in step 5 of the installation instructions.
The alternative comments template you’ll be pointing to (wp-paged-comments.php) is based on comments.php from WP’s default theme. This shouldn’t be a problem as it only contains minimal HTML, but if the theme you’re using is heavily customised you might want to edit this file to resemble your theme’s own comments template.
Creating a guestbook page is simply a matter of creating a WP page like any other (but with comments enabled) and designating it the guestbook within your site. You don’t even need this plugin if you’re happy having all your guestbook entries (ie. comments associated with your ‘guestbook’ page) appearing on a single page.
If, however, your guestbook grows to hundreds or thousands of entries, you may not want to deluge visitors with everything on one page (bandwidth costs may also be a concern here), instead you have the option of enabling this plugin and serving up comments in smaller chunks.
Hope that helps. Let me know how you get along.
I found the call in the main template page, but yeah I’m not using the default theme, I’m using a customized version of Rin. The comments template looks to be quite modified from the default template, I think it would be too confusing and too much work for me to get it to match (afraid I’d FUBAR the whole thing). >_
I inserted the code, but all I see is my comments being numbered above the comment. I’m not seeing the numbers at the bottom and so on. I have not modified the code of the template at all- fresh out of the box. And when I get the plugin working, how do I set a limit on how many comments I want on a page? Do I have to modify the wp-paged comments.php? I’m using the falling leaves template, and I replaced the comment_template() code in the index.php page and the single.php page.
Thanks for the help
[…] . I’m currently using the following plug-ins… Front Page Cats Gravatars Paged Comments Post Templates by Category Post Updated RunPHP wpContactForm WP-Grins wpPaginate […]
Nice work chief 😉
[…] ???? ????, commeents? ?? ?? ??? ?? ?? ?? ?? WordPress Paged Comments Plugin? ???? ???. ??? ???~
Entry Filed unde […]
very nice plugin for wordpress!
i have translate your wp-paged-comments.php in german, for default german theme.
Link: http://www.bueltge.de/wp-content/download/wp/wp-paged-comments.php.txt
With best regards!
Hi,
beautiful plug-in but would it be possible to have comments only in the first paged one, the one with the article body and NO article body text in the following pages?
example:
http://www.example.org/2005/08/12/my-article/
includes the article plus the first 10 comments
while
http://www.example.org/2005/08/12/my-article/comments/2
includes ONLY the following 10 comments with NO article and possible a link the the former page.
Many thanks.
Massimo.
Ampersand and Stephen:
To alter the style of the comments you’ll have to fiddle with the CSS.
Here’s the CSS snippet for comments I use on my own site:
You’ll probably have to alter this to suit your own site, but I hope you find it helpful. The last CSS rule on div.comment-number specifies where the comment number will appear.
To set a limit on the number of comments appearing on each page you’ll have to modify the paged-comments.php file and alter the line with the per_page value: $paged_comments->per_page = 10;
Frank:
Thank you! I’ve added a link on this page to your translated German version.
Massimo:
A very simple solution can be found here. The last solution on that page is implemented on the site.
Thanks, very useful. I modified it a little to display the last comments at the bottom of the page, but still sorting the pages from last to first.
Hi
Somethings really wierd here… or? i’m creating a static page with comments enabled but it doesnt show any commentfields or textboxes at all…? I have Random_Image as theme.
am i wrong? shouldnt i just write/create a page and allow comments?
The page template within the default WordPress theme (and probabaly other themes) doesn’t include the code required for comments to be left and viewed. WordPress is, however, capable of linking comments to pages in addition to regular posts. Look in the theme folder and you’ll probabaly find a page.php file (the template for WordPress pages). If you edit this file and copy over the line(s) of code that calls comments_template() you’ll find comments will work within pages too.
Some themes (for example, K2) include a page template and a “page with comments” template. This gives you the option of selecting the appropriate template within WordPress when creating a new page.
You wrote:
“Some themes (for example, K2) include a page template and a “page with comments” template. This gives you the option of selecting the appropriate template within WordPress when creating a new page.”
In my template i dont have that option. I still havent figured this out. I can see my wp-paged-comments.php in the theme editor but when i create a new page i have only the link and archive page but in in the “Custom Fields” where i can “Add a new custom field to this post” there i can see the wp-page-template. but i cant do anything with it.
I have set the Comments per page to 5 and the Page range to 5 and i have 11 comments in my “guestbook”. but it doesnt show any comments per page. i thought it worked but it didnt.
I have copy over the “comments_template()” with ”
” and i did it on the the single.php.
thanks
[…] ????? ???? ?? ?????? ?? ??? ??????… ??? ??? ?? ???? ?? ???~ ??? ???…???? ???.. ?? ??? ??? ??? ??? ????? ???… ;( ???? ???? ???? ???… paged ????? thread???? ???? ??(?)? ?? ???? ??? ???? ? ? ???… ???? ??? ?? ??? ??? 5??? ? 5?? ??????.. ?? ? ???? ????? ? ? ???, ??? ?? ???… ??.. ????? ?… ? ?? ??? ?????? ??????… ????? P.S. ???? ??? ??? ??? ???? ?????~~;) # […]
Hi, Thank you very much for the great work.
One Question is left: at my site the counting is some kind of weird. For example when i have 11 commments on the post, there is only the 11th displayd. But it should show 10 on the “Page 2” and only 1 on page “1”.
Because now, the one who posts the 11th comment ist the one and ondly visible comment without clicking further.
Can i solve that somwhere in the config?
Regards Sandro
[…] Paged Comments plugin? guestbook? ?? […]
Martin, I’m not quite sure where you’re going wrong. You can ignore my comment about themes providing a comment-enabled template for the time being (that doesn’t affect the installation procedure nor the plugin’s operation). If you’re prepared to start again, I’d recommend you download the latest version of the plugin (version 2) and follow the updated installation instructions. If you’re still having problems, or if you feel my installation steps are too vague, please post again with more information and I’ll do my best to help.
Sandro, the behaviour you describe is the result of a conscious decision to “fix” each comment to its associated comment page. It is deliberately implemented this way to prevent comments from shifting from page to page when new ones get added. (It also ensures comments appear on the same comment page regardless of page order.) One issue that would arise if the plugin behaved in the way you describe is that of invalid comment permalinks. Some people like to have permalinks to comments, but if a comment can shift from page 2 to page 1, it makes it difficult to pin the comment down to one URL. Even the current implementation leaves a lot to be desired. (For example, comments deleted from the admin interface will cause shifts.)
Having said that, I realise many people aren’t too fussed about the permalinks issue, and would rather see the latest 10 or so comments when viewing an entry. So I will try and add an option for enabling the behaviour you describe. I’ll let you know when it’s done.
[…] Heb je een blog waar bij sommige posts het aantal reacties enorm oploopt? Dan is de Paged Comments plugin de oplossing. Deze plugin zorgt ervoor dat de reacties netjes verdeeld worden over verschillende pagina’s, zodat niet alleen de pagina sneller laadt, maar ook je bandbreedte kosten beperkt blijven. […]
Thank you!
[…] moyism informed me of WordPress plugin that allows you to have paged comments. I installed it and fiddled around with it until it looked similar to the old style. So comments are now shown 20 to a page. I actually wouldn’t have considered using this plugin if last week’s GSD final episode post hadn’t gone over 100 comments. Anyway, if you experience any types of problems, leave a comment or send me an email. […]
[…] Don’t know if I would ever put a Guestbook on my blog, but I’m seriously considering using the WordPress Paged Comments Plugin, since many page already have a lot of comments. […]
Hey,
I’m trying to use your plugin with Brian’s Threaded Comments. It seems that I will need to edit paged-comments.php. Can you tell me how I can do this? I have very little knowledge in these kind of things.
Hi Keyvan, I’ve merged your paged comments plugin and Brian’s threaded comments plugin here: http://gleamynode.net/wordpress/archives/106
I hope this can help ppl who encountered the same issue.
Hi Keyvan, thanks for the great plugin. I’m using a WP theme known as Pool ( http://www.lamateporunyogur.net/pool ). I’ve installed and activated the latest version of your plugin. I’ve edited the necessary phps, replacing the call function just as in point 4 and 5 above. I’ve not edited the CSS. Please click here http://img97.imageshack.us/img97/3892/poolpcproblems9mo.jpg to see what my problems are. I’ll sum up my problems in words as well:
1) the comment entry box is way off.
2) the posted comments have lost the original format of the Pool Theme. Original theme has alternating grey/darkgrey box.
3) The comment post number position: i wish to have it at the top right corner of the posted comment box.
4) i wish to retain the original theme elabarotion on some XHTML instructions below the comment entry box.
I’ve tested it on both Firefox 1.0.7 and IE 6.0, and both gave the same result.
Since i’ve not touch the theme’s CSS, i’ve cut and pasted the Comments components of the CSS for you to examine:
If only you can download the Pool theme and try to edit it such that your plugin will work perfectly with it, that will be really great! If otherwise, i would still appreciate if you can edit the css as you see above, such that all my problems could be rectified… Thanks for your time and effort! I hope to hear from you soon. Cheers.
Hi Gio, I’ll try and create a paged comments template for that theme (it appears to be a popular one). Hopefully tomorrow, but could be later.
Gio, the comments-paged.php for the Pool theme is available here: http://dev.wp-plugins.org/browser/paged-comments/trunk/themes/pool/. You’ll need to add the additional CSS (found in the readme.txt file) to your style.css if you want to display the comment numbers on the top right corner. You can see it working here: http://keyvan.net/wordpress-testbed/?p=3#comments
Dear Keyvan, thanks for the great support and implementation! Everything works smoothly, it’s clean as a whistle. I’ll be spreading the word to all Pool theme users. Cheers mate!
Sorry Keyvan, another problem. I’ve implemented the fancy url to “true”. But the new permalinks for the comments don;t work. I will get redirected to my home page, with a “Not Found, Error 404”. I have permalink on at my site, and it works perfectly. I’ve only had problems with your fancy url not working. I’ve added the 2 lines after “#end wordpress” in .htaccess. This is how my .htaccess looks like now:
think you can help? cheers!
Is there a way to automatically clear the Name and Mail input text area after the comment is submitted? For privacy I need that infor to be cleared after submission.
How do you get the comments to all be displayed automatically on this page instead of forcing the user to click the usual ‘comments link’ to see them?
I’ve been trying to find out how to do that on my site for days now with no luck…
Help?
Lonnie, I’m not quite sure I understand your question. As far as I know most WordPress themes will display all comments associated with a post (or page) when that post (or page) is viewed on its own. So I’m not doing anything special to display comments on this page, you’re simply viewing a single entry. I think the comments link only appears when you’re viewing a number of posts (e.g. the latest posts displayed on the homepage). Let me know if I’ve misunderstood your question.
Snoogly, I’m sure there must be an easier way to do this (maybe even through the admin interface), but here’s one solution: Open the comments-paged.php template file you’re using and remove the PHP code from the value attribute of the input elements. (I’ve highlighted the relevant code to remove from the snippet below.)
Gio, sorry for the late reply. I’m afraid I don’t know why you’re having problems with fancy URL enabled. You should only be getting 404 if the rewrite rules aren’t working, but you say the WP generated rules are working. Have you checked to make sure WP isn’t overwriting the plugin’s rules you’ve manually added when it’s updating the htaccess file?
Thanks! That works perfectly, and was VERY easy to do. Other suggestions I have seen were much more complicated.
I have another question: I don’t need visitors to enter their Website, but I would like them to enter their student ID number (this is a site for university students). Is it possible for users to enter their ID number into the Website field, and then make that field required?
Nice plugin. Thanks!
Thank you SO MUCH for this plugin! It worked perfectly, and was a breeze to modify to fit my template. You can see it in action here:
http://www.automatorworld.com/?p=56
Problem:
I have my comments set to descending order. The problem with this is if I have 8 total comments, page 1 will have 3 comments, and page 2 will have 5.
Is it possible to have an option (or hack) to reverse this? So that page 1 of comments will always be full (5) and page 2 will have 3 comments, and back fill from there?
Steve, this issue has already been raised. I responded saying I’d try and include an option to enable the alternate behaviour. Unfortunately I haven’t had a chance yet, but as it’s now the single most requested feature (2 requests!) 🙂 I’ll try to release something in the next few days.
The mob has spoken! 🙂
Thanks so much for addressing this Keyvan, I look forward to the new version.
Steve, the new version is now available. I had so much on I couldn’t get it done sooner. You can either download the new paged-comments.php file (making sure you copy over your current configuration) or copy and paste the minor changes into your existing paged-comments.php file.
If you do get a chance to try it, let me know if it works okay. Thanks.
It works perfectly, thanks so much.
10 Trackbacks
[…] and normally not visible, even through the admin interface. I’ve also installed the Paged Comments plugin by Keyvan Minoukadeh. This plugin is different from the above p […]
[…] very day, I decided my Guestbook was getting a little lengthy. I found a great new plugin Paged Comments. WordPress Paged Comments is a plugin for WordPress 1.5 to allow comment paging. Usef […]
[…] ???? ????? ???? ?????? ?? ???. – ??: WordPress Paged Comments Plugin -?? * ???? ??????: redal […]
[…] . I’m currently using the following plug-ins… Front Page Cats Gravatars Paged Comments Post Templates by Category Post Updated RunPHP wpContactForm WP-Grins wpPaginate […]
[…] ???? ????, commeents? ?? ?? ??? ?? ?? ?? ?? WordPress Paged Comments Plugin? ???? ???. ??? ???~
Entry Filed unde […]
[…] ????? ???? ?? ?????? ?? ??? ??????… ??? ??? ?? ???? ?? ???~ ??? ???…???? ???.. ?? ??? ??? ??? ??? ????? ???… ;( ???? ???? ???? ???… paged ????? thread???? ???? ??(?)? ?? ???? ??? ???? ? ? ???… ???? ??? ?? ??? ??? 5??? ? 5?? ??????.. ?? ? ???? ????? ? ? ???, ??? ?? ???… ??.. ????? ?… ? ?? ??? ?????? ??????… ????? P.S. ???? ??? ??? ??? ???? ?????~~;) # […]
[…] Paged Comments plugin? guestbook? ?? […]
[…] Heb je een blog waar bij sommige posts het aantal reacties enorm oploopt? Dan is de Paged Comments plugin de oplossing. Deze plugin zorgt ervoor dat de reacties netjes verdeeld worden over verschillende pagina’s, zodat niet alleen de pagina sneller laadt, maar ook je bandbreedte kosten beperkt blijven. […]
[…] moyism informed me of WordPress plugin that allows you to have paged comments. I installed it and fiddled around with it until it looked similar to the old style. So comments are now shown 20 to a page. I actually wouldn’t have considered using this plugin if last week’s GSD final episode post hadn’t gone over 100 comments. Anyway, if you experience any types of problems, leave a comment or send me an email. […]
[…] Don’t know if I would ever put a Guestbook on my blog, but I’m seriously considering using the WordPress Paged Comments Plugin, since many page already have a lot of comments. […]