Primary

Shortcodes

Decent Comments Shortcodes

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

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 : …

exclude_post_author
Default : false
Set to true if comments on posts from the post’s author should not be included.

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