Latest Comments

In this article


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.

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