Skip to main content

Badge

A small pill of text — a label, announcement or status marker, optionally linked and optionally prefixed with a sub-tag ("NEW · We just shipped v2.0").

The block renders through the badge 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
tag_textThe leading sub-tag, e.g. “NEW”
messageThe main text
linkMake the badge a link
leadingWhat appears at the start (icon, dot, nothing)
leading_iconIcon at the start
trailing_iconIcon at the end
styleBadge design preset
shapePill, rounded or square
sizeBadge size
alignAlignment
tag_styleHow the sub-tag is styled against the pill
hoverHover behaviour
pill_colorPill background
text_colorText colour
tag_colorSub-tag colour
aria_labelAccessible label when the text alone is not descriptive

Anything not listed stays available in the page builder, and round-trips untouched.

Three groups are deliberately page-builder only

The element has 29 content options; the sidebar shows the ones that decide what the badge is. Left out on purpose:

  • link_target and the rel_* switches — link and SEO plumbing, easy to set wrongly without seeing the whole page.
  • The schema_* fields — they emit structured data. Same reasoning as Star Rating: worth a deliberate decision, not a sidebar toggle.
  • dismissible / dismiss_id — a dismissal that persists per visitor needs an id chosen with care, and a half-set pair silently does nothing.