Comment (deprecated)

This block is deprecated and should not be used in new content. Please use the Comments block instead.
  • Name: core/post-comment
  • Category: theme
  • API Version: 3
  • Block Type: Hybrid (static save + server enhancements)

Block Relationships

Allowed inner blocks:
core/avatar
core/comment-author-name
core/comment-content
core/comment-date
core/comment-edit-link
core/comment-reply-link

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
commentId number

Supports

Defined via the supports property in block.json.

Context

Defined via the usesContext and providesContext properties in block.json.

Provides context:

  • commentId attribute commentId

Block Markup

This is a hybrid block. It saves static markup that the server may enhance during rendering.

<!-- wp:core/post-comment -->
<div class="wp-block-post-comment"></div>
<!-- /wp:core/post-comment -->

Source