[Library] Editorial

Catalogue accessStandard

Comments region

The comment thread as a ruled record: a long rule under the count, then every comment opened by a currentColor hairline with the name tracked small against a plain date, the comment set at reading size, and the reply link tracked back down to the name's size. Replies are indented by WordPress, so the hairlines step in with the depth of the thread. Dynamic core blocks, so it shows the comments on the post it is placed on; the preview here is sample data.

Variation View
Before you copy

Identical markup in every theme. Manrope typeface rgb(255, 255, 255) ground 1280px viewport

The comment thread, ruled. core/comments with core/comments-title, core/comment-template, core/comment-author-name, core/comment-date, core/comment-content and core/comment-reply-link inside it.

The signature moment

The rules step with the thread

Every comment is opened by a hairline that runs the full 1240 measure, and a reply's hairline starts where the reply starts. WordPress indents nested comments by wrapping them in an <ol> inside their parent, so the moment each comment carries its own border-top the indentation stops being whitespace and becomes a visible step in the rules. Measured at 1400 in Twenty Twenty-Four: the top-level rules start at the band's left edge, the reply's starts 30px in. At 390 the same 30px is a bigger fraction of the measure and the step reads harder.

Under each rule the text is held to a 44rem reading column at the LEFT, not centred, so the rule is long and the words are short. That gap between rule length and measure is the second half of the composition: the thread looks like a ledger somebody is still writing in rather than a boxed comment widget.

The type does the rest. The name is 13px at 0.18em uppercase, the date is 13px plain beside it, the comment is 17px at 1.6, and the reply link comes back down to the name's size. Nothing is boxed and nothing is tinted.

What it inherits from your theme

  • The typeface. No font family is stated.
  • Your colours. The band asks for base and the type for contrast, both ending on a colour WordPress guarantees. Every rule is currentColor.
  • The indentation. Core and your theme decide how far a reply steps in. This pattern decides that the step should be visible, not how big it is.
  • The reply link's colour, which is your theme's link colour, because it is the one thing in the row a reader is meant to click.

What it decides for itself

  • Full bleed with a 1240px measure and a 44rem reading column held left.
  • The count is a heading and the label above it is not. "The thread" is a 13px tracked paragraph; core/comments-title sits under it at up to 34px with showPostTitle: false, so it reads "4 responses" rather than repeating the post's title, which the page has already printed once.
  • No pagination block. core/comments-pagination saves as null and must carry no wrapper element of its own; it is left out rather than shipped as a trap, and a thread long enough to need it can add the block itself.
  • No comment form. Add core/post-comments-form under this section if your template does not already have one; its fields are your theme's, and this pattern deliberately does not try to restyle them.

What to change first

  1. The reading measure. 44rem on the per-comment group. Widen it and the rules stay where they are while the text runs longer.
  2. The label. "The thread" is a paragraph. Delete it and the count carries the section on its own.
  3. The date format. core/comment-date takes a format attribute.
  4. The rule weight. 1px currentColor on the top of each comment. 2px turns the thread into a list of cards, which is the composition this one is avoiding.
  5. The finish. Ship the base for a stacked record, and thread-hang where you want to scan who said what.
It shows YOUR comments, and the preview is our sample content97 words

core/comments renders the thread on the post it is placed on. The preview on the product page is our preview site's seeded discussion: four approved comments, one of them a reply, on a post called "The weight of a line". Your page will carry your thread, and a post with no comments renders the region with its title and nothing under it.

It belongs in a single post template, under the content. The comment blocks read the post from block context, so pasted into a post's own body they print nothing at all, with no warning anywhere.

Why the date is not a link61 words

core/comment-date links to the comment's permalink by default. An anchor carries a colour rule of its own that beats an inherited colour, so a linked date takes the theme's link colour and lands beside a name that has ours. It ships isLink: false; the reply link is the one anchor in the row and it is supposed to look like one.

Notes33 words
  • Core blocks only: group, columns, column, paragraph, comments, comments-title, comment-template, comment-author-name, comment-date, comment-content, comment-reply-link. No plugin, no script.
  • Valid at WordPress 6.6.7 and 7.0.4, base and variation, 13 and 15 blocks.
Back to the library