Keyvan Minoukadeh

WordPress Paged Comments Plugin

Filed under: General — Keyvan @ 12:24 am

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

Related Downloads

Installation for WordPress 2.5

If you’re upgrading from a previous version, skip these installation steps and read the upgrade steps.

  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

  • 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?

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.)

This month I’ve received £0 ($0/€0) :(

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

697 Responses to “WordPress Paged Comments Plugin”

Pages: « 7014 13 12 11 10 [9] 8 7 6 5 41 » Show All

  • 90
    Vinu

    Boss,
    Cal i have a copy of this Theme “keyvan”?

    Thanks alot for the Plug-in…
    Can we add more fields? like Location, Gender…etc?

    Vinu

  • 89
    Keyvan

    Sean: The plugin uses the comments-paged.php template instead of comments.php. If you’re careful, you can open the two templates (comments-paged.php and comments.php) side by side and try to move over the code from comments.php to comments-paged.php (while preserving the plugin-related code).

    When I get more time, I’ll write a brief guide for theme authors, showing how to build a comments-paged template. (It’s not too difficult to figure out by looking at the code).

  • 88
    Dayna

    Thanks loads Keyvan. Got it working already! =)

  • 87
    Sean Hyde-Moyer

    Got it!

    There was a readme in the Themes>Default folder:

    ADDITIONAL NOTES:

    You can enable commenting on pages by adding the line:

    php if (function_exists('paged_comments_template'))
         paged_comments_template(); else comments_template(); 

    above the php get_sidebar(); line in page.php

    Following this additional step made it all good.

    Now I just have to figure out why it nuked my live preview window…};^)

  • 86
    Keyvan

    Sorry for the late reply. I’ll try and answer a few of the questions…

    Chris: I’ve tried to answer some of your questions on the FAQ.

    If you’re still having trouble with inserting the title, it’s likely to do with the use of <?php> tags in your code snippet. Try changing

    <?php if (!isset($_GET['cp'])) {
      the_content(’<p>Read the rest of this entry</p>’);
    } else {
      echo ‘<p>You are browsing a page of comments on “<?php
        the_title(); ?>”. Read “<?php the_title(); ?>” <a href="’,
        get_permalink(), ‘">here</a>.</p>’;
    } ?>

    to

    <?php if (!isset($_GET['cp'])) {
      the_content(’<p>Read the rest of this entry</p>’);
    } else {
      echo ‘<p>You are browsing a page of comments on "’,
      the_title(”,”,false), ‘". Read the full story <a href="’,
        get_permalink(), ‘">here</a>.</p>’;
    } ?>

    (The arguments to the_title() ensure the value is returned and not printed, your echo statement does that for you.)

    I know you had some other questions, if you’d still like me to have a go at answering them, let me know. (This reply is quite late so you might have figured out the solution to the other problems by now.)

    Tim: What you’re asking for is possible, but I don’t have the time to do it myself. Setting the comments per page value to 1 should show you one comment per page. This will also give you a URL for each comment, but these URLs won’t be very reliable as permalinks—deleting one comment will affect the page numbers and therefore the permalink. Ideally you’d want the comment ID (which currently appears as a fragment identifier of the URL) to be part of the URL as a path segment.

    Dayna: Thanks for the suggestion. I’ll include an option in the next version. Here’s one solution you can use now. If your theme has a separate template file for pages (the default theme has single.php and page.php) you can edit single.php and remove the call to paged_comments_template() (to return it to the state it was in prior to step 5). This will remove paging from all posts and will bypass the Paged Comments plugin completely.

    Sean: Can you provide the URL of the post with comments on. If Paged Comments is not enabled through the admin panel then everything will work as before. If you give me a URL I can check to see from the HTML source if the comments-paged.php template file is being used or not.

  • 85
    Sean Hyde-Moyer

    Hi Keyvan,

    The plugin looks awesome!

    But I’m having no luck getting to work:

    WordPress 2.0, Connection-Reloaded v1.2.2 Theme (sort-of)

    I’ve installed the bits in the proper places, and I’m using the “comments-paged.php” from the Default folder. I’ve also renamed paged-comments-config.php.

    I think it’s the replacement of comments_template()that the problem.

    The Connection-Reloaded them has:

    single.php
    page.php
    pages.php

    page.php does not contain any invocation oh comments_template(), pages contains one (which I replaced).

    With the plugin activated, I see no effect. I have a post with 12 comments, no pagination, and the main index seems to have some basic pagination that has nothing to do with your file.

    I’m stumpped!

    Thanks for your time (and the plugin!)
    Sean Hyde-Moyer

  • 84
    Sanjay M

    Thank you very much for your plugin, I’m finding it very useful for my site. It really speeds up page access by limiting the page size and is a big boon! :-)

  • 83
    Dayna

    Hi Keyvan,

    Thanks for updating this plugin so that it’s working great with WordPress 2.0. I wanted paged comments for all my pages not posts, is it possible to add an option for it so that I don’t have to add the custom field to all my pages?

    Thank you.

  • 82
    Improving the readability of large numbers of comments — cre8d design blog

    [...] Split things up - I’m 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 page. [...]

  • 81
    BloggingTom

    WP Paged Comments Plugin

    Kommentare zu Postings können manchmal ganz schön unübersichtlich werden, und mit der Anzahl der Kommentare steigt auch die Ladezeit der Seite. Dies ist auch beim Post “Die Eypo AG schlägt zurück“, einem der beliebtesten Artikel auf d…

Pages: « 7014 13 12 11 10 [9] 8 7 6 5 41 » Show All

Leave a Reply