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!

Documentation

The documentation is available on the Decent Comments documentation pages.


Comments

352 responses to “Decent Comments”

  1. I am using “ultimate_member”, will it be possible to SHOW only the comments of each user? 😥

    1. Hi Frank, I don’t know if that is possible but you could approach any customization using the filters for comments, as the plugin obtains the comments using the WP_Comment_Query class, see this line for the query call that could be filtered in a similar way that the plugin does (it adds its filter just before that call and removes it afterwards).

      1. gracias hermano

  2. Is it possible to configure the widget in such a way that comments are grouped to a post (so that in the case of a large number of comments to one post, the entire list is not filled with just one post) and, for example, under the link to the commented post, provide the last 5 links to the comments of a given post?

    I want the list to be displayed like this:

    – commented post 1 (title and link) – last date of comment:
    user1, user2, user3, user4, user5 (and linking to a specific comment)
    – commented post 2 (title and link) – last date of comment:
    user1, user2, user3, user4, user5 (and linking to a specific comment)
    – commented post 3 (title and link) – last date of comment:
    user1, user2, user3, user4, user5 (and linking to a specific comment)

    THX!

    1. Hi Artur,

      Thanks for your question! What you describe would not be possible to achieve with the plugin, but maybe you could use parts of it as an inspiration to derive your own code. If you look at the get_comments() method, this is in charge of rendering comments, where you could create a similar solution which groups the comments per post. I would recommend to create your own shortcode for that, to keep the default provided by the plugin separate from your customized solution.

      Cheers

  3. Hi,
    I have found that if I refresh the page many times, the decent-comments widgets will disappear.

    1. Hi, does this happen when you clear your cache or disable it?

  4. Hi,
    I have activated the plugins, and set it in widgets page. But it did not appear in my website. I use the newest version in WordPress.

    1. I have tried many time, and I found it is because the title don’t support Chinese! When I type Chinese, I disappeared.

      1. Hi, there’s no issue with using Chinese or any other language in the widget’s title. That won’t affect whether it appears or not.

    2. Sounds like it might be a caching issue … did you clear caches after adding it?

  5. Dear,
    We’re using your Decent Comments,
    We want to ask:
    In the shortcode, how do I display: The number of comments for a post.
    For example: 1 post has 55 comments, we want to display this number 55 at the end of the post title

    Thank you guys, you have a great plugin

    1. Hi Voocha,

      For this case it would be recommendable to use the decent_comments_comment_output filter, it’s documented on the API page.

      You can customize the output for each individual comment using that filter. In your case, you could append the information on the number of comments for the particular post that the comment has been posted on.

      Note that the filter receives the $comment_ID in its arguments, so you would first have to obtain the comment, then obtain the post ID and use that to get the number of comments on the post.

      Example implementation of such a filter: https://gist.github.com/itthinx/7f759490e1acd565a3532ee4d3cd9534

      See also the documentation on WordPress’ add_filter and Hooks.

      Cheers

  6. Hi, I’m using wpdicuz in private mode but I still want it to show comments in your plugin? Please help me, thank you

    1. Hi!

      If the wpDiscuz plugin is protecting its private comments (they seem to have an extension for that which you are probably using), then I would assume that these would not be displayed via Decent Comments when someone who is not authorized is viewing comments. But if the queries are correct for the context and the viewing user, I would assume that the private comments would be included. If that is not the case, they plugins simply aren’t compatible.

      Cheers

  7. So heplfull
    Thanksssssss

    1. Great, thanks! 🙂

  8. Great widget but I couldn’t figure out the way of limiting the display to only those groups to which the current user belongs.
    Thanks
    Kit

    1. Hi Kit,

      Please have a look at the Widgets section in the documentation on Groups, this might be what you’re looking for. Please note that to use it, you will need to use Classic Widgets for now, as Widgets Control Pro is not compatible with the new Block Widgets Editor introduced in WordPress 5.8.

      Cheers

      1. Many thanks Kento I’ll take a look

  9. Hello, for some reason, Gravatar is not floating left on my sites (and on a test site with last default theme). I wish a little more style on the comments : bold for authors, italic for date and so on. Thanks for your plugin.

    1. Hi Li-An!

      Thanks for using it! What you describe can be done with appropriate CSS rules to customize your theme.

      Cheers

      1. Yes, I know how to do but, by default, the comments are not super readable. Thanks for your quick answer, I will have a look.

  10. Hi there

    Does this support pagination as well if you ask it to display 5 items?

    best wishes
    Katy

    1. Hi Katy,

      Good question, currently it doesn’t support pagination but we have it noted as an improvement for some future update. Thanks for asking, it’s good to know that there is interest in having that.

      Cheers

  11. I’am not able to display post comments of a specific category (slug of category is test)
    I use the shortcode : [decent_comments taxonomy="category" terms="test"]
    It’s the same if i use widget
    Thanks

    1. Hi,

      This is working fine with the latest WordPress version so I would suggest to check for other plugins that might be interfering and disable them.

      Cheers

      1. OK it’s resolve…
        Thanks

  12. Is there a way to organize comments by most likes instead of date or author name?

    1. Hi David, most likes would probably be related to a plugin that records likes on comments – it’s not something that this supports. Sounds like a good idea though!

  13. kenjacq Avatar

    While using the shortcode, I’m adding strip_tags=”false”. However all comment text runs together without line breaks from the original comment post. All else is working great, except for this. Any thoughts?

    1. I guess this is because the line breaks you mention are in fact paragraphs within HTML p elements and those get stripped away with this option.

      1. kenjacq Avatar

        I was under the impression that strip_tags=”false” would not strip away the formatting. I’ve also tried the opposite logic, strip_tags=”true” with the same result. Additionally, any hyperlinks which may be present within a comment are not linked.

        Whereas viewing these comments within (beneath) the WordPress Post itself – all formatting is present (as well as any embedded links which may be present in a comment).

        I suppose whatever underlying cause here with Decent Comments rendering may be outside the apparent issue with this plugin. Perhaps it’s something else. I was hoping it would be a relatively simple/quick remedy, something I missed – because I do like the plugin and its usefulness. Thanks.

        1. Hi there,

          I think that in your case, something else must be removing the tags. If you take [decent_comments strip_tags="false"] for example, it will show links, paragraphs, etc.

          Make sure that you use straight double quotes to enclose the value you pass to the shortcode attribute: " – otherwise WordPress will not recognize the value you try to pass on.

          Cheers

  14. Would you buy a premium version of our Decent Comments plugin for WordPress?

    Please vote and reply with your ideas: https://twitter.com/itthinx/status/1281571957968969729

  15. Mayavin Avatar
    Mayavin

    Hi, the plugin is taking the default headline/body font from the theme and I would like it to use another one. `
    Could you please tell me where can I modify the CSS and what class to use?

    1. Hi Mayavin,

      You can find out easily which classes are used on the elements that you are concerned with by using the Inspector Web Developer tool in Firefox (Firefox > Tools > Web Developer > Inspector). Create a child theme based on the theme you would like to customize and add your CSS to its stylesheet.

      Cheers

  16. Hi! First, thank your for your plugin. It’s the only avaliable to create a “Last comments page”. So I did, with some modifications to the code to break the lines (you provided the modifications in a comment).
    https://www.saindodamatrix.com.br/comentarios/

    The only problem I have is when someone posts an instagram link, with preview, and when someone posts an image. In the first case, the preview breaks the formatting, and in the second case the image doesn’t appear at all. Could you help me pointing what to change in the code to do that? Thank you.

    1. Hi there!

      Thanks for using the plugin 🙂

      If the preview that you mention is not structurally sound, then that would be the cause. This is independent from what Decent Comments does so you would have to get them fix their code.

      Cheers

  17. Hi
    Pls inform whether it is possible to set random comments for each page/post as widget?
    Thanks

    1. Hi Igor,

      Thanks for asking, random order is not supported for comments.

      Cheers

  18. Hi,
    Maybe I’m at the right place to ask..
    I’m looking for a possibility to simply integrate and display on my blog WordPress the comments I posted in others blogs.
    I want to show my visitors the comments I left on other blogs. But it’s not possible with Decent Comments…
    Do you have an idea ?
    Many Thx
    JP

    1. Hi JP,

      Thanks for asking, this wouldn’t be possible with the plugin though. It’s intent is to work with the comments on its blog, it wouldn’t be able to pull in those you have left on others.

      Cheers

      1. Hi Kento,
        Thx. It’s a pity I think this plug-in does not exist elsewhere.
        Maybe it would be nice to work on it..
        Just an idea a suggestion.
        Good continuation !
        JP

        1. Thanks JP, yes I can see that could indeed be quite useful 🙂

          1. You are a magician !))

        2. Some web sites provide a Comments RSS feed, sometimes even for a particular category or post.. You can display that RSS feed (stock standard WordPress function) in a widget on your site.
          You will get ALL comments however. You would need a more capable RSS plugin to filter the feed by author name.

  19. Hi,

    Is there a way to get the post link to open in a separate tab/page when clicked?

    Thanks

    1. Hi Ian,

      Not as an option although there is the decent_comments_comments_output filter hook which could be used to modify the output. You’d have to parse it though which might be a bit of an overkill. If Javascript is an option, the link is rendered within a span with CSS class comment-link and that could be easily targeted to add the target=”_blank” attribute to the anchor.

      Cheers

  20. Hi, you have a highly configurable “Decent comments” for WordPress. Thank you for that! My only struggle is the formatting of the comments. It doesn’t retain line breaks, nor clickable links. Is there something I can do?

    1. Hi!

      Thanks for using it! There is an option that can be used with the shortcode:

      [decent_comments strip_tags="false"]

      If you use this instead of the widget, the comments will retain the formatting.

      As the Decent Comments widget currently does not offer the option itself, you can use this in combination with a content block from our Widgets Control.

      Cheers

  21. I have installed the plugin and put it into a left sidebar and the layout of the comments is totally messed up. I can see the HTML and CSS through the developers console and the “floats” and “display” fields seem all wrong. For example I click “Show Date” and I see the generated CSS has “display: none;”
    Is there a version of WordPress this simply is not compatible with?

    1. Hi Scott,

      The plugin is compatible up to the latest version, but what you describe sounds like a representation issue and that stems from the theme you are using itself. You will likely need to adjust or add CSS rules to make it fit in.

      Do you have an example page where we could see it in action?

      Cheers

  22. Hi!
    Can you please help me…
    I need to translate the “at” in the date and time string.
    Loco Translate couldn’t do it…
    Kind regards,
    Johan

    1. Hi Johan,

      If you check the plugin’s decent-comments.pot in its languages folder, you will find the translatable string ” %1$s at %2$s”.

      Cheers

      1. I have already translated that string and it works great when I am using the widget.
        But on a common page with comments it still shows “at”.
        Maybe I have to translate it somewhere else then…?
        It is truly strange, because in my wp-admin/comment.php it is also translated…
        Regards,
        Johan

        1. I think that those might not be from the plugin then – you say common page, you mean the comments that appear below the content?

          1. I found it!
            It was hardcoded in my theme, overriding WordPress own translation.
            Thank anyway, for a great and Decent Comments plugin.
            Regards,
            Johan

            1. Ah perfect, glad to hear that you found it and many thanks for using the plugin! If you have any suggestions for it anytime, please let me know. Cheers!

  23. Thank you for your great plugin Decent Comments that I’ve used for years. Ideally the backend widget would have a box “Number of days to restrict” where a default value of 0 means no restriction… whereas 14 means to restrict to only those whose date is within the last 14 days.

    I’m not sure where I should add code to do this and what code would be the most efficient.

    I’m sure many sites prefer showing no comments rather than displaying comments that are months or years old.

    Are you able to share a hack for this, or enrich the plugin to incorporate this?

    1. Hi Eric,

      Many thanks for your kind comment and suggestion on the plugin. I have taken note of your suggestion as a feature to limit comments displayed not older than x days as a feature enhancement to be added to it. I can’t promise on an ETA for it yet, but I think it’s a valid option that can be added.

      Cheers

  24. Is there a way to only show one comment per original post? I would like to make sure a single post with a bunch of comments doesn’t dominate the list of recent comments.

    Thanks!
    Ben

    1. Hi Ben,
      Sorry there isn’t this option. You can use the ‘decent_comments_comments_output’ filter. In this code you have an example of use where the comments order is changed, you can use this code as reference for filter the comments.
      You need to change the shuffle( $comments ); instruction.
      Kind Regards,
      Antonio B.

  25. Hi, Great plugin!!!. Is there any way to add the comments star ratings? something like – show_star_rating=”true” ???

    1. Hi Randy,
      Sorry the plugin doesn’t support rating. If you are using another plugin to add ratings to comments, you can use the ‘decent_comments_comment_output’ filter for add code in every comment content.
      Kind Regards,
      Antonio B.

  26. Also, would it be possible to add an option to shorten post titles to a certain number of characters, similarly to how you can limit the comment excerpt length?

    1. Hi,
      You can truncate the widget title using the ‘widget_title’ filter, but this will affect to all widgets.
      Also you could use css to truncate the text, this post can help you.
      Kind Regards,
      Antonio B.

      1. Hi Antonio,
        thanks for the reply. I don’t think this helps me, though. I’m talkin about truncating just the “comment-link” segment because my post titles are often long so they take up a lot of space when I make a list of recent comments for example: https://imgur.com/888AkkF

        But maybe I just don’t know how to apply the CSS correctly, or I’m misunderstanding.

        Anyway, I’ll try to send you the Czech translation as soon as I can.

        1. Hi Petr,
          please give me your url, I will try to solve it by css.
          Kind Regards,
          Antonio B.

          1. It’s http://www.elonx.cz (specifically the recent comments widget in the sidebar)

            1. Thanks,
              Please try with this:
              .decent-comments .comment {
              overflow: hidden;
              text-overflow: ellipsis;
              }
              .decent-comments .comment .comment-link {
              white-space: nowrap;
              }

              Kind Regards,
              Antonio B.

              1. Hi, thanks for the code. The result is okayish on Chrome (not perfect though, due to this resulting in the user name being on a separate line which wastes space) but the truncation works. Problem is that on Firefox it doesn’t display correctly – longer user names get broken up into two lines for some reason (even though the line is otherwise mostly empty). But don’t worry about it too much. The untruncated links aren’t the end of the world, although I’d still prefer an option in the plugin itself that would do the link truncating. 🙂

                Keep up the good work and thanks for the help!

  27. Hi, I’d like to provide Czech translation for your plugin. Could you email me the file(s) that I could translate?

    1. Hi scr00chy,
      Sure, in the ‘languages’ folder in the plugin you have a decent-comments.pot file that you can use with poedit.
      When you have the files please send them to me antonio[at]itthinx[dot]com
      Thank you very much for the contribution !!
      Kind regards,
      Antonio B.

  28. Hello Antonio,

    thanks for the wow plugin.
    a) Maybe include to shift the answer to comments a bit to the right. So it is more than a conversation. like above.
    b) alternate the background color like above.

    This would be very nice.

    1. c) i miss the date of the comments, like above.

      1. Hi Tobias,
        The widget in the actual version includes an ‘Show date’ option. The shortcode version includes an “show_date” param. Sorry, we are improving the documentation.
        Kind Regards,
        Antonio B.

    2. Hi Tobias,
      Thank you very much for the suggestions.We will review them.
      Kind Regards,
      Antonio B.

  29. One of the roles is added manually while the other is automated during registration. So, there is a default role. Anyone can register and get to level 1 (the least amount of privileges, who shouldn’t see all comments) and I have to manually add people to level 2 (they can see all comments). Thanks for your help, Antonio.

    1. Hi Monica,
      Related to the registration process, I think this plugin can help you ( adds a user to a group based on role, a group named after the role is created automatically if needed ). Or this code, in this case, you need to add this code in your functions.php child theme file, changing ‘Premium’ for your group name.
      The changes of roles manually, you can change the user group from the Users->All users section (above the table you have an easy option)
      Kind Regards,
      Antonio B.

  30. Posting the same question again, as I do not see my question in this thread:

    I read ‘Mr. blabla’ on (Page name). Is there a way to translate the word ‘on’ as this should be ‘in’ in Dutch?
    Or do I have to make .mo/po files etc.?

    1. Hi Maarten,
      In the plugin you have a ‘languages’ folder where you have a .po file that you can use to create the dutch translation. Sorry, we don’t have dutch translation.
      If you send it to us when you have the translation, we will add it to the repository.
      Kind Regards,
      Antonio B.

  31. I have different roles on my site, and only one role can see all comments. Will it filter out comments based on role? Can it be customized to do that? Thanks!

    1. Hi Monica,
      There isn’t a filter based on roles, but you could add all users of this role, to a specific group, and restrict the comments to this group.
      I will try to help you, how do you add the users to the role? When registering? Manually?
      Kind Regards,
      Antonio B.

Leave a Reply

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

Share