Overview

What It Is and Where It Lives

Heading Line is the partial that lives inside the fc-blocks/heading parent block. When an editor is working inside a Heading block, they add one or more Heading Line partials as its children — each one contributing a single line of text to the overall heading. This structure lets a heading be composed of multiple independently styled lines rather than forcing all the text into one undifferentiated string.

Why You'd Use It

The parent Heading block establishes the HTML element (h1, h2, div, etc.) and overall layout, but it has no text content of its own — that all lives in its Heading Line children. Reaching for a Heading Line partial is how you get any visible heading text at all. More importantly, because each line is its own partial, you can style lines independently: one line might render at h1 scale in the brand primary color, another at a sub-title scale in a muted tone, another pulling in the current post's title dynamically — all stacked inside a single heading element on the page.

Key Capabilities

  • Static or dynamic text — each line can display either manually entered text or content pulled automatically from the current post (post title, post excerpt, or a personalized greeting using the logged-in user's first name)
  • Pre-greeting prefix text — when the dynamic "User Message" source is selected, an optional text prefix (e.g. "Welcome back,") is prepended before the user's name
  • <mark> tag accent support — static text fields accept <mark> tags to highlight a word or phrase in a configurable accent color
  • Independent typographic styling per line — each line carries its own Heading Class (h1–h6, strong variants, caption variants, sub-title, or inherit) and Text Transform (inherit, none, capitalize, uppercase, lowercase)
  • Per-line heading color — a theme-palette color picker sets the text color of that line independently of other lines
  • Mark color — a second theme-palette color picker controls the color applied to any <mark>-wrapped text within the line
  • Bottom margin control — a Spacing panel (sidebar) exposes margin-bottom adjustment for the line; top, left, and right margin and all padding sides are intentionally disabled for this partial

DOM Structure

<!-- when heading text is empty or resolves to false, nothing is rendered -->
<span class="{headingClass} text-transform-{textTransform} mark-{markColor-slug}" style="color: {headingColor}; {spacingStyles}">
  <!-- when "Use Dynamic Content" is off: outputs static heading text entered by editor -->
  <!-- when "Use Dynamic Content" is on and Dynamic Content = "Post Title": outputs current post title -->
  <!-- when "Use Dynamic Content" is on and Dynamic Content = "Post Excerpt": outputs current post excerpt -->
  <!-- when "Use Dynamic Content" is on and Dynamic Content = "User Message" and before-text is set: outputs "{beforeDynamicContentText} {userFirstNameOrDisplayName}" -->
  <!-- when "Use Dynamic Content" is on and Dynamic Content = "User Message" and before-text is empty: outputs "{userFirstNameOrDisplayName}" (or "visitor" if not logged in) -->
  {headingText or dynamic value}
  <!-- <mark> tags within heading text receive accent color from Mark Color setting -->
</span>

DOM Notes

No dynamic regions.

Technical Documentation

Parent Block

Heading Line lives inside the Heading block. To add a Heading Line, open a Heading block in the editor and use the block inserter to add one or more Heading Line children. Multiple Heading Line partials can be stacked inside a single Heading to build up multi-segment heading text (for example, a label line followed by a larger display line).

Canvas Controls

These controls appear directly on the block canvas in the editor, not in the sidebar.

Use Dynamic Content

  • Attribute: useDynamicContent
  • Type: Checkbox
  • Default: false (unchecked)

What it controls — Toggles whether the heading line's text is pulled automatically from the current post or logged-in user context, or typed in manually by the editor.

Options

  • Unchecked — a free-text input field appears on the canvas where the editor types the heading text directly.
  • Checked — the free-text field is replaced by a dynamic content source selector (see Dynamic Content Source below).

Heading Text (static mode)

  • Attribute: headingText
  • Type: Text field
  • Default: empty

What it controls — The literal text that renders inside the heading <span> on the front end. Accepts plain text and <mark> tags; wrapping a word or phrase in <mark> applies the accent color set in Mark Color (see below).

Conditional Logic — Visible only when Use Dynamic Content is unchecked.

Dynamic Content Source (dynamic mode)

  • Attribute: dynamicContent
  • Type: Single-select dropdown
  • Default: post_title

What it controls — Determines which piece of CMS or user data populates the heading line on the front end.

Options

  • Post Title — renders the current post's title via get_the_title().
  • Post Excerpt — renders the current post's excerpt via get_the_excerpt().
  • User Message — renders a personalized greeting. If the visitor is logged in, their first name (or display name as a fallback) is used; if not logged in, the word "visitor" is output. A prefix string can be added with the Before Text field below.

Conditional Logic — Visible only when Use Dynamic Content is checked.

Before Text (User Message prefix)

  • Attribute: beforeDynamicContentText
  • Type: Text field
  • Default: empty

What it controls — An optional string prepended to the user's name when Dynamic Content Source is set to User Message. For example, entering "Welcome," produces "Welcome, Sarah" for a logged-in user whose first name is Sarah.

Conditional Logic — Visible only when Use Dynamic Content is checked AND Dynamic Content Source is set to User Message.

Block Settings

Text Transform

  • Attribute: textTransform
  • Type: Single-select dropdown
  • Default: inherit
  • Panel: Appearance

What it controls — Applies a CSS text-transform utility class to the rendered <span>, controlling the capitalisation style of the heading line text.

Options

  • inherit — no override; the heading line inherits the transform set by the parent Heading block or theme styles.
  • none — forces normal mixed-case rendering.
  • capitalize — first letter of each word is capitalised.
  • uppercase — all characters uppercase.
  • lowercase — all characters lowercase.

Heading Class

  • Attribute: headingClass
  • Type: Single-select dropdown
  • Default: inherit
  • Panel: Appearance

What it controls — Applies a typographic style class to the rendered <span>, making it visually match a specific heading level or variant regardless of the HTML element used by the parent Heading block. This lets a single Heading block combine lines of different typographic scales.

Options

  • H1 – H6 — Sizes the text to match that heading level's theme style.
  • H1 Strong – H6 Strong — Applies the heading level style with bold/strong weight emphasis.
  • H1 Caption – H6 Caption — Applies the heading level style with caption styling (typically lighter weight or smaller secondary treatment).
  • Sub Title — Applies a subtitle typographic style.
  • Inherit — No class override; inherits the parent block's styling.

Heading Color

  • Attribute: headingColor
  • Type: Color picker (theme palette, no custom colors)
  • Default: none (inherits)
  • Panel: Appearance

What it controls — Sets an inline color CSS property on the rendered <span>, overriding the text color for this heading line. Colors are drawn from the site's theme color palette.

Notes — Only theme palette colors are available; arbitrary hex values cannot be entered. Clearing the selection removes the inline color and restores inherited styling.

Mark Color

  • Attribute: markColor
  • Type: Color picker (theme palette, no custom colors)
  • Default: none
  • Panel: Appearance

What it controls — When the Heading Text field contains <mark> tags, this setting determines the accent color applied to those marked words. A utility class (e.g. mark-primary--500) is appended to the <span>'s class list, and the theme's CSS applies the chosen color as the mark background or text accent.

Notes — The color selection is mapped to a CSS custom-property–based class name derived from the theme palette. Only palette colors work; no custom color entry. If no <mark> tags are present in the heading text, this setting has no visible effect.

Margin Bottom

  • Attribute: spacing (index 9)
  • Type: Single-select dropdown
  • Default: inherit
  • Panel: Spacing

What it controls — Sets the bottom margin of the heading line <span>. Useful for adjusting vertical rhythm between stacked Heading Line partials inside one Heading block.

Options (shared across all spacing dropdowns):

  • Inherit from theme — uses the theme's default spacing variable.
  • None — sets margin to 0.
  • Quarter — calc(var(--base-spacing) * 0.25).
  • Half — calc(var(--base-spacing) * 0.5).
  • BASE — var(--base-spacing).
  • Double — calc(var(--base-spacing) * 2).
  • Triple — calc(var(--base-spacing) * 3).

Notes — The Spacing panel for Heading Line exposes Margin Bottom only. Padding (top, bottom, left, right), margin top, margin left, and margin right are all disabled for this partial. The "Fine Tune Margin" toggle and global margin dropdown are hidden because only one margin axis is active; the Margin Bottom dropdown appears directly.

Cross-Block Relationships

The parent Heading block controls the HTML element tag (h1–h6, p, span) that wraps all its Heading Line children. Each Heading Line renders as a <span> inside that wrapper element, so the semantic heading level is determined at the parent level. Editors use Heading Class on individual Heading Lines to independently control the visual typographic scale of each line without changing the parent's HTML tag.

Multiple Heading Line partials stacked inside one Heading block each render their own <span> in sequence, allowing a single heading element to combine distinct typographic styles, colors, and text transform rules line-by-line.

Theme-Level Integrations

The Heading Color and Mark Color pickers are populated exclusively from the site's theme color palette, which is defined in Theme Options. If the palette changes in Theme Options, the available colors in these pickers update accordingly. The spacing scale values (Quarter, Half, BASE, Double, Triple) are all calculated against the --base-spacing CSS custom property set at the theme level, so adjusting the base spacing in Theme Options proportionally affects all Heading Line spacing overrides.