Decent Comments Manual

Decent Comments Widget Configuration

To use a Decent Comments comment widget on your site, go to Appearance > Widgets and drag a Decent Comments to the desired sidebar. If you don’t want to customize the widget’s settings, you’re done.

You can use as many Decent Comments widgets you want, each with different settings.

For each widget, these options are available:

  • Title : If desired, give your widget a title that will appear above the comments.
  • Number of comments : Determines how many comments will be shown.
  • Order by … : Choose the criterion used to sort comments.
  • Sort order : Based on the criterion, comments can be shown in ascending or descending order.
  • Post ID : If empty, shows comments from anywhere on your site, based on the criterion chosen. You can enter part of the title of a post or a post’s ID to only show comments related to a specific post. You can enter [current] or {current} to show comments for the post that is currently displayed.
  • Show comment excerpt : If checked, shows excerpts of the comments. If unchecked, shows the full text of comments.
  • Number of words in excerpt : Determines up to how many words are shown as an excerpt for each comment.
  • Ellipsis : This is shown after a comment’s excerpt, if there are more words in the comment than shown in the excerpt.
  • Show author : If checked, displays the author of each comment.
  • Show avatar : If checked, displays the comment author’s avatar.
  • Avatar size : Determines the size of the avatars shown in pixels.
  • Show link to post : If checked, shows a link to the post that the comment is related to.
  • Show the comment : If checked, displays the comment excerpt or full comment.
  • Taxonomy : Indicate category if you would like to show comments on posts in certain categories. Give the desired categories’ slugs in Terms. For tags use post_tag and give the tags’ slugs in Terms.
  • Terms : If a taxonomy is given, indicate the slugs of the terms in that taxonomy separated by comma to show comments for all posts related to these terms. To show comments on posts related to the same terms as the current post, indicate: {current}. If a taxonomy is given and terms is empty, no comments will be shown.

Decent Comments Shortcodes

Decent Comments provides the [decent-comments/] shortcode that can be used to embed comments anywhere.

The shortcode can now also be written as [decent_comments/] (with an underscore instead of a dash).

If no attributes are given, the default settings are used.

Using default settings

Place the following shortcode anywhere to show comments based on the default settings:

[decent-comments/]

An example using customized settings

Place the following shortcode anywhere to show 25 comments featuring 64 pixel avatars:

[decent-comments number="25" avatar_size="64" /]

Shortcode attributes

The [decent-comments/] shortcode supports the following attributes:

ellipsis
Default : …

excerpt
Default : true

max_excerpt_words
Default : 20

strip_tags
Default : true

avatar_size
Default : 24

number
Default : 5

order
Default : "DESC"
Possible values: "ASC", "DESC"

orderby
Default : "comment_date_gmt"
Possible values:
"comment_author_email" : Author Email
"comment_author_url" : Author URL
"comment_content" : Content
"comment_date_gmt" : Date
"comment_karma" : Karma
"comment_post_ID" : Post

post_id
Possible values:

  • "{current}" : show comments for the current post
    Usage: [decent_comments post_id="{current}"]
  • a post ID : show comments for a specific post
    For example: [decent_comments post_id="123"]

show_author
Default : true

show_avatar
Default : true

show_link
Default : true

show_comment
Default : true

taxonomy
Use category for categories or post_tag for tags.
Default : empty

terms
A comma-separated list of term slugs.
Default : empty

Posted in Plugins, WordPress

66 comments

  • Hi,

    I want to create box at the bottom of each post which says something like:

    x people have commented on this post, what are your thought

    where x is the number of comments for the specific post

    if x = 0

    then the text would say

    Still no comments be the first to comment, click here.

    The click here would be a link which then opens the comment box.

    Is this possible with your great plugin. I could not see how to configure the shortcodes to do the number of comments.

    Anyway, if this is not something that is possible then thank you for your time.

    thanks for the great work.

  • Hey thanks for the quick response. The plugin is great I will figure out your template idea.

    Have a good weekend.

  • ahow628

    Do all parts of the shortcode customization need quotemarks?

    For example:
    [decent-comments number=”25″ excerpt="false" avatar_size="32" /]

    I guess I thought that false and 32 would NOT have quotemarks around them.

  • Stuart Bainbridge

    Is there any way to show the date of a comment?

  • Hello, I’ve installed the Decent Comments plugin, and it looks like it will be exactly what I want. My only problem is, when I choose to “Show link to post” from the widget options, only the most recent comment is displayed and it also hides the excerpt.
    I have chosen to display the 8 most recent comments, with 20 words for the excerpts and it all works great until I tick the “Show link to post” option. Can you suggest anything that I can do here, as I would ideally like to show the link to the post that the comment relates to.
    Thanks for any help,
    Barry

    • Have you checked Show the comment as well? If yes and they don’t show up, can you give a link to your site where the widget is visible please?

      • Thanks for the reply. Yes I have ticked the “Show the comment” box as well. I currently have the options set up as I would like to have them, and you can visit the site here, http://www.barryyoung3d.com/blog
        Also, it appears that it works perfectly in Chrome, but doesn’t appear right in Internet Explorer or Firefox.
        Thanks
        Barry

        • Thanks Barry, checked your site but the Decent Comments widget isn’t displayed there. You’ve got a widget Recent Comments but that’s not the one.

          • Thanks for your reply, no, I have switched out the widget. I found one that was displaying how I would like it to across the various browsers. Thanks for taking the time to have a check.
            Cheers.

  • jps

    hi,

    when using shortcode is it possible to use PostID’s? more specific is it possible to use “current” as postID attribute?

    - j

  • Bob

    Can I display the current comments into the Shortcodes.
    If not, his there a way to do this?

    [decent-comments max_excerpt_words="55" number="10"/] [current]

    • It could be made possible, the shortcode doesn’t take the post_id attribute though. I thought it more useful for the widget to offer that option but didn’t see the need to use that in the shortcode as you usually get the comments for the current post anyway … but this is the second time someone asks for this :)

  • What about display only comments from current post using shortcode. Is there any attribute to do that?
    Thanks.

  • What would the shortcode be for calling a category or post tag? I can’t get it to work. Thanks.

    Examples that don’t work:

    [decent-comments max_excerpt_words="400" category="blog"/]

    [decent-comments max_excerpt_words="400" taxonomy="blog-post-2"/]

    • For the dogs and cats categories: [decent_comments taxonomy="category" terms="dogs,cats" /]
      For the mice and rats tags: [decent_comments taxonomy="post_tag" terms="mice,rats" /]

  • Worked great, Kento. Thanks very much!

  • I forgot to ask: Is it possible to have the shortcode also show the comments box to add a new comment? Thanks.

  • Thanks for the reply.

  • I’m using mingle forum and would like decent comments to be able to pull conversations from the forum in the same way it does regular posts and pages.

    I don’t see any options that I can set for Decent Comments, so I think I’m just missing something. All I see under options is a checkbox about deactivation, so I don’t know.

    Also, and this may be asking way too much, I’m displaying my comments in a static tabbed sidebar (theme: suffusion) with the shortcode. I’m okay if each type of comment is displayed together; post&page comments AND forum comments. But I’d kind of like it better if I could give the mingle comments a separate tab.

    http://www.puravidapost.com is the site. Thanks for the help and the nice plugin.

    • Mingle forum doesn’t seem to use WordPress categories (at least from what I’ve seen so there might an option to do that I am not aware of). If it were using these, you could simply add a Decent Comments widget and set the category, that could also solve the second question but unfortunately it won’t be possible.

  • I would like to change the output of the word “on” to a different language. How can I do this?

  • Remco

    Hi,
    The fonts are very small in the widget area from this plugin.
    How can i set the text to a biger font in youre plugin?

    All other plugins are the normal size of my site only this plugin has a font hight lower.

    So can i set a different highed in font?

    • Yes you can do that by providing CSS rules targeted at the content that the plugin renders. It provides appropriate classes for that.

  • huangyz

    thanks for your great work!
    I found that the option of “Number of words in excerpts” is actually not the number of words in the comment, when I entered “1″, it comes out more than 1 word. Don’t know why this happens, maybe there’s Chinese words in the comment or my WP-site is setup in Chinese.

  • huangyz

    http://www.bingocloud.cn
    the widget is placed in the lower sidebar on the right, the setting of “Number of words in excerpts” is 2, but you can see there’re more than 2 words in each comment.

  • Awesome that I can finally display all comments for a certain taxonomy. I wonder if there’s a way to subscribe to the comment “feed” via email so that users can register to only comments of a certain taxonomy. I’ll start digging through the code!
    Cheers!

  • sergio

    hi, i’m using twitter avatar reloaded so people can put their twitter avatar on comments, how can i show the avatars on a page?

    because it does not show the original avatar, only the mystery man avatar.

    thanks

  • Hello, I have a website with this wonderful plugin, but I need the plugin did not show the category in which you will find the comment, it only wants to put the name of the person who commented and comment but no where did . Thanks from Argentina

  • Jarret

    Sort of a feature suggestion, I had a client that wanted everything this plugin offered except they wanted the title of the post linked to the post itself and not the comment like it is usually setup.

    I’m sure this isn’t a common request so not sure if you’d want to add it in as a feature or not. Only had to change a small part on one line to get this working.

  • Mike

    Hi,

    I would like to show comments by author:

    [decent-comments comment_author=123/]

    It would be great to call the author by ID, name or email.

    Is this possible, and if not, can we make it so?

    Cheers,

    Mike

    • Hi Mike, thanks for the suggestion, I’ve added it as a feature request. Can’t promise to add this soon though because of other priorities. If someone wants to implement it and send over a patch I’d be happy to add it though. Cheers

  • If I have a category that is category/website-course/lesson-1 and I want to show the latest comments in the “lesson-1″ category, how do I do that?

    When I try to enter {current} it doesn’t work. Instead it disappears after being saved.

  • Bob

    I am so glad I found your plugin. Working great, I just need a little help with the shortcut syntax.

    I am trying to insert a shortcut into a php file using the following code:

    The links are being displayed and I’d like to hide them. It seems any variable I try that’s got a Boolean value doesn’t seem to work. show_avatar is another one I’ve tried.

    The other variables are passing ok. Please let me know what I am doing wrong.

    Many thanks!

    • Bob

      Code didn’t make it into the post. I am using the php “do_shortcode” function and I can’t get the links to stop being displayed.

    • Bob

      Please disregard, I figured out how to use the API function: Decent_Comments_Renderer::get_comments().

      It’s working great, many thanks for a cool plugin.

  • Scott

    Great plugin! Is it possible to display threaded/nested comments somehow?

    • Scott

      Forgot to mention I am using the shortcode so I can display the comments right inside the content. The scenario is to testimonials from a main page on promotional pages and it would be good to show replies to the testimonials from the client.

  • Mike

    I would like to change the output of comment like this (【comment】). How can I do this? thanks

    • antonio

      Hi Mike,
      I do not understand what you want to do. Can you explain a little more please?,
      thanks

  • fereydoon

    hi, thanks for your very interesting plugin. i want to show my post comments in certain tab in my site. i can show previous comments ith shortcode. but also i need a part to add new comments. what can i do? please help me.

  • Sweet work! I was wondering if there is a way to show original post thumbnail?

    Thank you for any insight!

    Jeff

  • Antonio, that would be great… thank you very much!

    Jeff

Leave a comment

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

*


− 2 = six

Please follow the Support guidelines.

Premium Support is available for customers in the Forums.