render_block_core_comments ( $attributes, $content, $block )

  • (array) attributes Block attributes.
  • (string) content Block default content.
  • (WP_Block) block Block instance.
  • (string) Returns the filtered post comments for the current post wrapped inside "p" tags.
Defined at:


Renders the `core/comments` block on the server.This render callback is mainly for rendering a dynamic, legacy version of this block (the old `core/post-comments`). It uses the `comments_template()` function to generate the output, in the same way as classic PHP themes. As this callback will always run during SSR, first we need to check whether the block is in legacy mode. If not, the HTML generated in the editor is returned instead.

Related Functions

render_block_core_comments_title, render_block_core_comment_date, register_block_core_comments, render_block_core_latest_comments, render_block_core_cover

Top Google Results

User discussions

wpseek mobile