Decent Comments

Decent Comments shows what people say.

If you want to show comments along with their author’s avatars and an excerpt of their comment, then this is the right plugin for you.

And it’s not limited to just a widget showing recent comments: The plugin provides configurable widgets, shortcodes and an API to display comments in sensible ways, including author avatars, links, comment excerpts …

Anywhere you place comments, by means of a widget, a shortcode or an API call, you can:

  • Show an excerpt or the full comment. You can choose to not show the comment as well.
  • Determine the number of words shown for excerpts.
  • Set your kind of ellipsis.
  • Set the number of comments to show.
  • Show the author’s avatar and determine it’s size.
  • Sort by author email, author URL, content (what’s said in the comment), date, karma or post … in ascending or descending order.
  • Show comments for the current post or for a specific post.
  • Show comments for posts in specific categories, for specific tags, … (more precisely: the ability to show comments from posts related to one or more terms in a chosen taxonomy).
  • and more …

Feedback is welcome! If you need help, have problems, want to leave feedback or want to provide constructive criticism, please leave a comment.

Please try to solve problems before you rate this plugin or say it doesn’t work. There goes a lot of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Thanks!

Follow me on Twitter for updates on this and other plugins.

Documentation

188 comments

  • I am not a developer. I am just a user. I have no idea how to code. I am sure the plugin author can do this

    • I’ll need a patch to see what modifications have been made and include them, you can ask the freelancer who did it for the patch.

      • Harpreet Singh

        Hi,

        I’ve done the modification, Can you provide me the sample of patch?
        Then i’ll give you the patch according to it.

        • Hi there,

          Sure, you would do it like this:

          1. Check out the trunk: svn co http://plugins.svn.wordpress.org/decent-comments/trunk decent-comments
          2. Add your modifications to the copy you now have in decent-comments.
          3. From within the decent-comments directory: svn diff > decent-comments.patch

          Then please post a link to the patch to download it.

  • After I initially left a comment I appear to
    have clicked on the -Notify me when new comments are added- checkbox and now
    each time a comment is added I receive 4 emails
    with the exact same comment. Perhaps there is an easy method you are able to remove me from
    that service? Many thanks!

  • I installed your plugin – don’t mean to sound daft, but – still NO COMMENTS show up after my posts and yes, there are comments that have been made. How do I actually configure your plugin to work? I’m not a techie, don’t know where to find the place to add “php” code I keep hearing about and no one ever says WHERE to find it to add anything to it. What good is a plugin that doesn’t do what it says? So, how do get your plugin to actually work on my site? Besides downloading it, and clicking the “activate” button, what else needs to be done? Thank you so much for helping me in plain, understandable and followable directions! Thanks!

  • There is a slight error in the comment renderer; where the output should say ‘(User) on (Article)’ it instead drops the space before ‘on’ and hence reads, “useron articlename”.

    I have fixed this by adding a comma in the comment renderer file.
    ie. ‘, on ‘

    Hope this helps. For your interest this is used on this charitable site http://www.nolimbs.co.nz

  • simon stanbridge

    Hi,

    Great plugin by the way. Just one thing. I use WP Content Filter to remove bad words from my site. What is the best way to make Decent Comments also filter bad words?

    I have achieved this by changing decent-comments/class-decent-comments-renderer.php from

    return $output;

    to

    return pccf_filter($output);

    But is there a better way to do this? Maybe by adding something to functions.php?

    I’m new to WP so please excuse my lack of knowledge. Hope you can help.

    Simon

  • Hi! First of all, your Plugin “Decent-Comments” is pretty cool. But I have a self hosted Blog and I want to use the WordPress App for Android to reply to the incoming comments. Is there a problem with the Plugin? Replying on my own blog doesn’t work. But on other Blogs it’s no problem… Any suggestions? Thanks for the help :)

    • antonio

      Hi,
      there should be no problem. You can disable this plugin, and try the app again. If the problem persist, this plugin doesn’t generate the conflict.
      cheers

  • raiden

    Put a options with max letters not words because people are spaming.Here is a example yooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo this is only 1 word but if world be something like max letters let say 10 yoooooooo… this would show up.

  • raiden

    Sorry I don’t know php but I can translate your plugin in my language.Can you let a email where I can submit the files?

  • Ckubs

    Hello. I’m setting up a new theme on my blog wich is focused more on the content and sidebars are quite minimal. I use and love your plugin but now I want to reduce some wasted space by removing my comments(author) from the list. Is there any way I can do that by user ID, email or donno? Thanks.

    • antonio

      Hi,
      there isn’t this option, but you can easily customize the plugin.
      In decent-comments/class-decent-comments-render.php you should change:
      At line 290:
      foreach ( $comments as $comment) {

      by
      foreach ( $comments as $comment) {
      if ( $comment->comment_author_email !== "youremail@domain.com" ) {

      and at line 328, change:
      }

      by
      }
      }

      cheers

  • Mariell

    Hi,
    this is exactly what I want to do, but the lines 290 and 328 does not match in my program. I can find “foreach …” etc, but it’s harder with }… Can you please describe the rows above and below?
    Thanks!

  • Peter

    If I have a site with 2 separate comments one side has red vote comments the other side has blue vote comments is this possible to sort into two groups for one post?

  • Hi,

    I just download and use your widget who is perfect !
    Just one thing : how to deactivate (no show) comments of the author of the blog ?
    Thank you for your answer.

    • Hi, thanks for the suggestion, this has just been added to the latest release. Widgets have the option to ‘Exclude comments from post authors’ and the shortcode can be used like this [decent_comments exclude_post_author="true"].

  • Does your plugin have the ability to filter out blog author comments and just show visitor comments? If not, is that a feature you’d consider adding?

  • Is there a way to indicate when the comment was made, e.g., 5 hours ago?

    • Hm, I don’t think so. It would have to be customized I suppose (or someone supply a patch for that and I’d be happy to include it).

  • Hi there , I want to display 10 to 15 recent comments. I just see recent comments made on current post. I want it to show 15 recent comments regardless post

    • antonio

      Hi,
      if you leave empty the “Post ID” field, Comments should be displayed regardless actual post.
      cheers

  • Emmanuel Carrizo

    testing it

  • Hello,

    I just did a plug update (Version 1.3.4) and now I get: Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/content/43/5150543/html/divhut/wp-content/plugins/decent-comments/class-decent-comment.php on line 307

    It was a great plugin but I removed it since it dowsn’t work anymore. Please help.

  • Jordan

    Great plugin.

    I’m trying to use it to display the newest comment from each section on the homepage of my site, and for the most part it’s working well. The only problem I’m encountering is that it doesn’t seem to represent new lines within the comments. Is there somewhere I can just drop an nl2br() within your code?

    Thanks!

    • Thanks Jordan :)

      What it does is present an excerpt of the comment, i.e. it will show the start of the comment based on the settings. Have a look at the strip_tags, excerpt etc. attributes in the manual, if you adjust these you should be able to see the comments with the new lines, although I would recommend to have your comments filtered and reviewed before they are displayed.

      • Jordan

        Thanks for getting back to me. My current shortcode is:
        [decent-comments number="1" excerpt="false" show_avatar="false" post_id="103" strip_tags="false"] (for example).

        While it is displaying the full comment, it is still stripping s/not converting them from new lines.

        • You’re welcome, Jordan :) You’re right, the shortcode looks ok as you are using it but note that it won’t convert the line breaks.

          • Jordan

            So… I’ve tried editing decent-comments/class-decent-comments-renderer.php

            I modified this section:
            if ( $show_comment ) {
            $output .= ”;
            $output .= self::get_comment( $comment, array( “ellipsis” => $ellipsis, “excerpt” => $excerpt, “max_excerpt_words” => $max_excerpt_words, “max_excerpt_characters” => $max_excerpt_characters ) );
            $output .= ”; // .comment-body or .comment-excerpt
            }

            To be:
            if ( $show_comment ) {
            $output .= ”;
            $output .= nl2br(self::get_comment( $comment, array( “ellipsis” => $ellipsis, “excerpt” => $excerpt, “max_excerpt_words” => $max_excerpt_words, “max_excerpt_characters” => $max_excerpt_characters ) ));
            $output .= ”; // .comment-body or .comment-excerpt
            }

            … but it’s still not adding the br’s. Any ideas?

            • antonio

              Hi,
              this is not the best practice .. but you can change:
              $content = $comment->comment_content;
              in line 147, to:
              $content = nl2br($comment->comment_content);
              Remember that when you update the plugin, this change will be lost.
              cheers

  • JanK.

    Hi there,

    I really like this plugin. I just have on idea: Can you make option to add link to comment to author’s name – so when I click on author it will take me to his comment? I know i can have link next to it (author on that or that page), but this would be better for me…

    Thanks

  • Mike

    Hi, and thank you for your nice plugins. I am currently restricting user access to certain parts of my blog through your excellent Groups plugin. Now I would like to show recent comments based on user privileges (Groups settings). So that users that are not logged in or doesn’t have the correct level can not see recent comments in private areas of the blog. Is this already possible with this plugin and I have simply missed it? Otherwise, could you add support for it or give a hint on how to modify the code myself?

    Thank you

    • Hi Mike,

      Many thanks for your kind comment :) Wouldn’t Groups Restrict Comments Pro be suitable for what you have in mind?

      Cheers

      • Mike

        Hi Kento,
        thanks for your reply. I would be happy to buy your plugin but I can’t see that it restricts the list of recent comments. Is there a trial version available?

        • Hi Mike,

          As long as the comments are retrieved through WordPress’ functions so that the access restrictions are effective, they would only appear to authorized group members – so normally it would also restrict the recent comments. There’s no trial version available but we can grant refunds where it doesn’t fit in the setup (see terms).

          Cheers

  • Hello,

    It will be interesting to have possibility to add ‘date’ of comment like we have author and/or avatar today.
    check box for date
    if checked, make choice for format of this date : DD/MM/YYYY, monday 5 january, MM/DD/YYYY HH:MM, …..

    thanks a lot

    Pascal

Leave a comment

Your email address will not be published. Required fields are marked *

*

Please follow the Support guidelines.

Premium Support is available for customers in the Forums.