Skip to main content

Newsletter

An email signup form — heading, description, name and email fields, a consent line and a subscribe button. Core has no equivalent block, and the usual alternative is embedding a third-party form that arrives with its own stylesheet and ignores your theme.

The block renders through the newsletter element — the same PHP that runs in the page builder, so the front end is identical either way.

What the sidebar exposes

OptionWhat it does
titleHeading above the form
descriptionSupporting text — paragraphs are added on save
show_nameAdd a name field before the email field
name_placeholderPlaceholder for the name field
email_placeholderPlaceholder for the email field
button_labelText on the submit button
consent_textThe consent / privacy line under the form
success_messageShown in place of the form after a successful subscribe
error_messageShown when the request fails
list_idWhich list the address is added to, for the configured integration
designForm layout preset — inline, stacked, boxed
alignHorizontal alignment
roundedCorner rounding on fields and button
accent_colorButton and focus colour
field_bgField background
bg_colorForm background
text_colorText colour

Anything not listed stays available in the page builder, and round-trips untouched — the block only writes the values you change, so an element styled in the builder keeps every setting this sidebar does not show.

note
consent_text and list_id are exposed on purpose

Both are easy to leave out of a curated sidebar and both are costly to get wrong.

A capture form with no consent line is a compliance problem in several jurisdictions, so the field is in the sidebar rather than one surface away — the safe thing should not be the harder thing.

list_id is here because a form pointed at the wrong list fails silently: subscribers are accepted, stored, and nobody ever reads them. That is worse than an error.

The preview is inert, and here it matters more than usual

Every block preview is non-interactive, but this is the only block whose element is a real form with a real submit handler. Left live, a stray Enter in the canvas would fire an actual subscribe request — against the rate limiter, from the editor, on behalf of whoever is logged in. The form works normally on the front end.

The nonce is not stored in the post

The form's security token is minted when the page is rendered, not when the block is saved, so a block sitting in a draft for a month still posts a fresh token on the day a visitor loads the page. There is no such thing as a stale nonce baked into this block's saved content.