It is unlikely that I will be developing this plugin any further. WordPress has had paged comments support in the core since version 2.7. This site is now running version 2.8.2 and the comment paging you see here is using WordPress’s built-in code and not my plugin. I haven’t studied the code being used by WordPress so if there’s something I had in my plugin that’s missing from WordPress’ standard comment paging, let me know and I’ll see what I can do.
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
- Thank You Stephen Colbert (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
Donate
If you find this piece of code useful, please consider donating. I’m a student working on these projects in my spare time. My sites carry no advertising and I release most of the code I work on under a free software license so anyone can benefit from it. I don’t receive any payment for this work so I have to rely on donations if I want to put off becoming a wage slave. Your contribution (whatever the amount) would be greatly appreciated.
| £ (UK Pounds) | ||||
|---|---|---|---|---|
| € (Euros) | ||||
| $ (US Dollars) |
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
540 Comments
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?
patung: Glad to hear it’s working.
kretzschmar: Thanks, I’ll include it in the next release.
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/
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.
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, 4I don’t know why $limit_clause is returning 4…
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.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
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
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,
Thanks for the comments everyone, I’ll get to them all in the next few days.
Does this work with the AJAX comments plugin?
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 …
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?
A new release will be coming soon. I’ve just had a fix submitted for those of you experiencing the
evalerror. Edit paged-comments.php and replace the last few lines of instructions with these:Thanks to Alexey G for the fix.
sahas: Enable the
fancy_urloption to get the comment-page-xx style links.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?
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?
Great plugin Keyvan, but do you know how to enable paged comments for popup comments. There’s a small mention about it a while back, but no follow up. I guess it’s not a very popular feature, but I’d really like to get this feature on my blog, and would gladly put in a donation if you could help me out.
Thanks.
Keyvan … this sounds like a great plugin that would really help me out, but when I tried to activate it, my site totally disappeared. My homepage and everything else had absolutely no content. Couldn’t even access WP admin.
Any idea what I did wrong?
I’m using WP 2.1 … that should be OK, right?
Here’s my site:
http://www.boyslife.org/section/games/games-guru/
Keyvan,
Thank you for a great plugin, I’ve been using it for over a year now. Some of my posts have a few hundreds comments and your plugin really helps.
Thanks for the comments everyone. To those having problems, please try version 2.6. The directory structure has changed, so if you’re currently using 2.5, read the upgrade steps.
New features/fixes
* German users should see ‘Show All’, ‘Newer Comments’ and ‘Older Comments’ translated. Thanks kretzschmar.
* Eval problem should be gone now. Thanks AlexeyG.
* Install for first-time users is now easier. No more copying template files to the theme folder.
Please let me know if you experience any problems.
Hey Keyvan … I downloaded the new plugin, but still no luck activating it. I get a blank site and blank admin page, and my site only comes back if I delete the plugin.
I’m sure it’s my fault. Probably a problem with my WP install, which is too bad because I could really use your plugin. I have a post with 800 comments that REALLY needs to be paged.
Thanks.
thank you for providing this plugin to the people.
[…] テーマを変更するにあたって、入れたのすっかり忘れてたのがコレ。 GuestBook自体はPluginではなくテンプレートですね。でもって、GuestBookにするとコメントが多くなるので Plugin:Paged Comments を利用しております。配布元:WordPress Paged Comments Plugin […]
Hi,
Why is that when I run
if ($paged_comments->pager->num_pages() > 1)
It gives:
Fatal error: Call to a member function on a non-object in comments.php on line 21
I’ve installed your great plugin! but I’ve a problem with language… How can I set italian language?
(example “show all” = “Mostra tutti”, “Responses to” = “commenti lasciati su”)
thanks in advance
Although i don’t have many comments on my blog, i do appreciate this plugin very much. Thanks for sharing.
I’m having somewhat of a usability problem when a user leaves a comment, but is taken to the first page rather than the page their comment is actual posted. Any ideas?
I have installed your plugin to paginate my guestbook (made with Guestbook Generator plugin http://wordpress.org/extend/plugins/guestbook-generator/) , but it doesen’t works.
It works in all the pages of my blog, except the guestobook page…
Can you help me? Tanks, and sorry for my bad english…
sdamy: I don’t have translations for the Italian language. If you (or anyone else) is able to translate and send me the strings used by the plugin, please let me know. You can see the 3 strings used by the plugin here: paged-comments.pot.
Ronald: Redirecting users to the comment page containing their submitted comment is something I’m going to look at for the next release.
Sergio: I’m not familiar with that plugin, but I don’t think you need a plugin to create a guestbook page for you. Simply creating a Wordpress page and calling it ‘Guestbook’ should work fine.
This plugin is GREAT!!
Hello!
Yesterday I installed your Paged Comments Plug-in to my guestbook’s page in WP 2.2.
I have tried to configure the config-file, but nothing happens. My earliest post shows first and I can’t see any page numbers. (I want to read the latest comments first.)
I don’t know if I had set the wrong code in my guestbook
to called the template.
I have tried to have the comment-paged.php, but when I do that I got this message.
Fatal error: Call to a member function on a non-object in /home/u/utmattningsdepressionnet/…/themes/refresh/comments-paged.php on line 26
Please, can you give me a tip how to fix this problem?
I hope you can understand what I mean; my English is not the best.
Sorry, I was too quick to post my earlier comment! I missed to read all text in your paged-comments.php file. Now I have change my guestbook to and it works great! Thank you for a great plug-in!
HI! I am looking forward to making this work.
Right now I get an error
Fatal error: Call to a member function on a non-object in /home/sinocida/public_html/dev/wp-content/themes/tiga-06/comments.php on line 105
My line 105 of comments.php is:
??? Any idea?
HI! I am looking forward to making this work.
Right now I get an error
Fatal error: Call to a member function on a non-object in /home/sinocida/public_html/dev/wp-content/themes/tiga-06/comments.php on line 105
My line 105 of comments.php is:
??? Any idea?
Using 2.0
Sorry, meant to say 2.1 latest update…
Hi.
I tried again today, and it works with Classic Theme, but not with Tiga-06. Is anyone using the Tiga-06 theme, or can help me out?
Thanks,
LaoLao
Hi, I already using the latest Paged Comments already. But seem like it doesn’t proper at wordpress 2.2
thanks for this plugin very nice
Great plugin Keyvan, but do you know how to enable paged comments for popup comments. There’s a small mention about it a while back, but no follow up. I guess it’s not a very popular feature, but I’d really like to get this feature on my blog, and would gladly put in a donation if you could help me out.
很好用……谢谢
Really looking forward to your AJAX paged comments. The demo looks awesome!
Any idea when it might be done?
Used this Paged Comments Plugin, the wp-print cann’t normal operation!Look at the trouble,Thank very much!
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?
数据恢复: 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.
@Keyvan
Thank you for your reply, I am looking forward to a version!
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!
Thanks for this! I will be using this pretty soon. By the way you have a really cool and clean site. Nice.
HOW DO I REMOVE THE PAGE NUMBERING??? YOUR COMMENTS DONT SHOW THE PAGE NUMBERING PLEASE HELP!
Unfortunately, your great plugin breaks
Paged Comments plugin
http://www.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.
279 Trackbacks
[...] good way to keep your comments tidy when you have a tremendous long list of comments. Check it out there and click Show All at the comment section. You will know what I mean. I have seen a lot of blogs, [...]
[...] 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 [...]
[...] Paged Comments by keyvan (to be used for guestbook). Use this output settings: [...]
[...] WordPress Paged Comments Si tus visitantes son de los que les gusta comentar, este plugin te vendrá bien, porque te permite paginar los comentarios echos a cada entrada. [...]
[...] 到目前为止, 我只试验过这个函数, 具体还未利用到。 不过 paged comments 就利用了这个函数解决了本要修改主题模板的麻烦, [...]
[...] (click to see the screenshot) Yup, finally, it’s separated. It even support the famous Paged Comments, of course, with a little hacked. Please download the plugin from MangoOrange instead. I have sent [...]
[...] needed if your comment number ever goes above ten, or in case you expect it to do that soon, is the Paged Comments Plugin. This automatically reverses the comments too, but you can undo that process, if you prefer. The [...]
[...] Paged Comments 插件支持模板。这个插件可以将评论分页,对于评论比较多的名博尤其有用,Apple Theme 已经集成了该插件所需要的评论模板文件。 [...]
[...] volver farragosos y largos de cargar si tienen muchos comentarios. Buscando por ahí encontré este plugin (paged-comments) que soluciona ese problema. La instalación es [...]
[...] (1)KEYVANサイトさんよりVersion 2.6.4 (2007-07-31) (zip file) をダウンロードしました。 「paged-comments」ホルダに paged-comments-config-sample.phpファイル paged-comments.phpファイル languagesホルダ themesホルダ readme.txt の5点が格納されています。 [...]
[...] Pagged comments es especialmente útil para blogs con muchos comentarios. [...]
[...] Paged Comments [...]
[...] un moment donné, ça suffit! J’ai ajouté un plugin de pagination des commentaires pour éviter que les pages avec plusieurs commentaires aient 3 km de long et prennent 10 minutes à [...]
[...] (1)KEYVANサイトさんよりVersion 2.6.4 (2007-07-31) (zip file) をダウンロードしました。 「paged-comments」ホルダに paged-comments-config-sample.phpファイル paged-comments.phpファイル languagesホルダ themesホルダ readme.txt の5点が格納されています。 [...]
[...] to achieve the contact form. This fantastic plugin is from Mike Cherim and Mike Jolley.I also use Paged Comments by Keyvan Minoukadeh to make comments paged. Thanks to you guys. You are so talented web [...]
[...] update v2.8 20 August 2008 19:40 Cel mai frumos scris si util plugin de paginare a comentarilor – Paged comments a lui Keyvan Minoukadeh – a primit un update pe care il asteptam de multa vreme: versiunea 2.8 rezolva problema (cu lipsa) [...]
[...] solution is the Wordpress paged comments plugin. This little plugin allows you to have paged comments on your blog instead of having a single page [...]
[...] 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://www.keyvan.net/code/paged-comments/ [...]
[...] should work with most plugins. It has plug & play support for these: Subscribe to Comments, Paged Comments, LMB Box Comment Quicktags, WP-PageNavi, WP-Email, WP-Print, WP-PostViews and Sociable. Tested with [...]
[...] Wordpress Paged Comments is a plugin for WordPress to allow comment paging. [...]
[...] meses que busco información sobre cómo cambiar el title a las páginas de los comentarios (uso el plugin Paged Comments); finalmente lo conseguí: sólo se trata de meter en una condición en el header que si estás en [...]
[...] keempat, Paged Comments. Ini juga salah satu plugin yang sudah saya gunakan sejak lama, dibuat oleh keyvan. Fungsinya [...]