Display a list of your most recent comments.
- Name:
core/latest-comments - Category: widgets
- API Version: 3
- Block Type: Dynamic (server-rendered)
- Keywords:
recent comments
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
commentsToShow |
number |
5 |
— |
displayAvatar |
boolean |
true |
— |
displayDate |
boolean |
true |
— |
displayContent |
string |
"excerpt" |
Enum: none, excerpt, full |
Supports
Defined via the supports property in block.json.
anchor:truealign:truecolor:html:falsespacing:margin:truepadding:true
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
Block Markup
This is a dynamic block. It is rendered on the server and does not save HTML in post content.
In post content, it is stored as a block comment:
<!-- wp:latest-comments {"displayAvatar":true,"displayExcerpt":true,"displayTimestamp":true} /-->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.