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

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

739 Responses to “WordPress Paged Comments Plugin”

Pages: « 7411 10 9 8 7 6 5 [4] 3 2 1 » Show All

  • 40
    Keyvan

    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.

  • 39
    Lonnie West

    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?

  • 38
    snoogly

    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.

  • 37
    Gio

    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:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://giolovesgod.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://giolovesgod.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.giolovesgod.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.giolovesgod.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://images.google.com*/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://images.google.com*$      [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://img415.imageshack.us/img415/925/nohotlinking1sq.gif [R,NC]
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [S=59]
    RewriteRule ^(guestbook)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(guestbook)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(guestbook)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(guestbook)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(guestbook)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(about)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(about)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(about)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(about)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(about)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(gallery)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(gallery)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(gallery)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(gallery)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(gallery)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(links)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(links)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(links)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(links)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(links)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]
    RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]
    RewriteRule ^page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]
    RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]
    RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]
    RewriteRule ^comments/page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]
    RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /index.php?s=$1&paged=$2 [QSA,L]
    RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]
    RewriteRule ^category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]
    RewriteRule ^category/(.+)/?$ /index.php?category_name=$1 [QSA,L]
    RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /index.php?author_name=$1&paged=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/?$ /index.php?author_name=$1 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /index.php?year=$1&paged=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/?$ /index.php?year=$1 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/trackback/?$ /index.php?category_name=$1&name=$2&tb=1 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&name=$2&paged=$3 [QSA,L]
    RewriteRule ^(.+)/([^/]+)(/[0-9]+)?/?$ /index.php?category_name=$1&name=$2&page=$3 [QSA,L]
    RewriteRule ^(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]
    RewriteRule ^(.+)/?$ /index.php?category_name=$1 [QSA,L]
    # END WordPress
    RewriteRule ^(.+/)comment-page-([0-9]+)/?$ $1?cp=$2 [QSA,L]
    RewriteRule ^(.+/)all-comments/?$ $1?cp=all [QSA,L]

    think you can help? cheers!

  • 36
    gio

    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!

  • 35
    Keyvan

    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://www.keyvan.net/wordpress-testbed/?p=3#comments

  • 34
    Keyvan

    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.

  • 33
    gio

    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:

    #commentlist {
        list-style-type: none;
        margin: 0;
        padding: 0;
    }
    #commentlist li {
        margin: 10px 0;
        padding: 5px 10px;
    }
    #commentlist p {
        margin: 0;
        padding: 0;
    }
    #commentlist small {
        font-size: 11px;
    }
    .class_comment1 {
        background: #E9E9EA;
        border: 1px solid #E0DEDE;
    }
    .class_comment2 {
        background: #F4F3F3;
        border: 1px solid #E0DEDE;
    }
    #comments, #postcomment {
        color: #0090DA;
        font-size: 14px !important;
        font-weight: normal;
        margin: 40px 0 10px 10px;
        text-transform: uppercase;
    }
    #commentform {
        background: #D3E4FF;
        border: 1px solid #D8D8D8;
        padding: 5px 20px;
    }
    #commentform input,
    #commentform textarea {
        background: #F9FBFF;
        border: 1px solid #B8D4FF;
        font-size: 12px;
        padding: 1px;
    }
    #commentform input:focus,
    #commentform textarea:focus {
        background: #EEF5FF;
    }
    div.comment-number {
        float: right;
        color: #999;
        width: 40px;
        text-align: right;
    }

    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.

  • 32
    Trustin Lee

    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.

  • 31
    wonny

    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.

Pages: « 7411 10 9 8 7 6 5 [4] 3 2 1 » Show All

Leave a Reply