Content · Gutenberg
Dual Heading block for WordPress
A two-part heading where each line has fully independent typography — color, size, weight, style, and special effects like gradient, highlight, or text stroke. Perfect for emphasis and visual hierarchy.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
A two-part heading where each line has fully independent typography — color, size, weight, style, and special effects like gradient, highlight, or text stroke. Perfect for emphasis and visual hierarchy.
Inspector panels on this block: Layout, Line 1 Typography, Line 2 Typography, Subtext Typography, Effect Colors. Those titles come from index.js, not from a shared template.
Behavior controls: “Arrangement” options: Stacked (one line per row), Inline (both on same line); “Text Align” options: Left, Center, Right; “Effect” options: None, Gradient (color wash), Highlight (box behind), Marker (underline wash), Stroke (outline only); “Effect (Line2Effect)” options: None, Gradient (color wash), Highlight (box behind), Marker (underline wash), Stroke (outline only).
Where to find it
Gutenberg inserter → Content → search “Dual Heading” (block name `blockenberg/dual-heading` in block.json). Style it in the sidebar after insert.
How to use Dual Heading block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Dual Heading”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Layout. Set “Tag”, “Arrangement”, “Text Align”, “Gap Between Lines (px)”.
- Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Tag | Select control; the chosen value is saved on the block. block.json default: h2. Saved as `tag`. |
| Arrangement | Select control; the chosen value is saved on the block. Options: Stacked (one line per row); Inline (both on same line). block.json default: stacked. Saved as `layout`. |
| Text Align | Select control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `textAlign`. |
| Gap Between Lines (px) | Numeric range control in the inspector. Range 0–40. block.json default: 4. Saved as `lineGap`. |
| Line 1 | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoLine1`. |
| Effect | Select control; the chosen value is saved on the block. Options: None; Gradient (color wash); Highlight (box behind); Marker (underline wash); Stroke (outline only). block.json default: none. Saved as `line1Effect`. |
| Line 2 | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoLine2`. |
| Effect (Line2Effect) | Select control; the chosen value is saved on the block. Options: None; Gradient (color wash); Highlight (box behind); Marker (underline wash); Stroke (outline only). block.json default: none. Saved as `line2Effect`. |
| Subtext | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoSubtext`. |
| Show Subtext | On/off toggle in the inspector. Off by default. Saved as `showSubtext`. |
| Stroke Width (px) | Numeric range control in the inspector. Range 1–6. block.json default: 1. Saved as `strokeWidth`. |
| Max Width (px) | Numeric range control in the inspector. Range 300–1400. block.json default: 900. Saved as `maxWidth`. |
| Padding Top (px) | Numeric range control in the inspector. Range 0–200. block.json default: 16. Saved as `paddingTop`. |
| Padding Bottom (px) | Numeric range control in the inspector. Range 0–200. block.json default: 16. Saved as `paddingBottom`. |
| Colors — Background | Color control in the inspector. Saved as `bgColor`. |
| Line 1 Color | Color control in the inspector. block.json default: #111827. Saved as `line1Color`. |
| Line 2 Color | Color control in the inspector. block.json default: #7c3aed. Saved as `line2Color`. |
| Effect Color 1 (gradient/highlight) | Color control in the inspector. block.json default: #fef08a. Saved as `effectColor`. |
| Effect Color 2 (gradient end) | Color control in the inspector. block.json default: #f97316. Saved as `effectColor2`. |
| Stroke Color | Color control in the inspector. block.json default: #7c3aed. Saved as `strokeColor`. |
| Subtext | Color control in the inspector. block.json default: #6b7280. Saved as `subtextColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
When this is the right block
- A two-part heading where each line has fully independent typography — color, size, weight, style, and special effects like gradient, highlight, or text stroke. Perfect for emphasis and visual hierarchy — that is the job of Dual Heading, not a generic content block.
- Use it when you need the editor control labeled “Tag”, which exists on this block’s inspector.
- Inserter grouping: articles, cards, lists, and long-form layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Dual Heading block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Dual Heading”. It sits under Content. After insert, open Layout and set “Tag”, “Arrangement”, “Text Align”, “Gap Between Lines (px)”.
What makes Dual Heading different from other Blockenberg blocks?
A two-part heading where each line has fully independent typography — color, size, weight, style, and special effects like gradient, highlight, or text stroke. Perfect for emphasis and visual hierarchy. Inspector labels on this block include “Tag”, “Arrangement”, “Text Align”, “Gap Between Lines (px)”.
Is the Dual Heading Gutenberg block free?
Yes. Dual Heading ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Dual Heading to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Layout, Line 1 Typography, Line 2 Typography, Subtext Typography).
Related content blocks
Accordion
Collapsible accordion panels for FAQ, features, and more.
Accordion Table
A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices.
Alert / Notice
Info, success, warning or error notice block with icon, title and body text. Pure CSS — zero JS.
Big Stat
Display a single large impactful statistic with prefix, suffix, label, and multiple visual styles.
Blockquote / Pull Quote
Stylish quote block with accent line or decorative marks, author name, role and photo.
Callout
Highlighted panel for tips, warnings or success messages with icon, title and dismissible option.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Dual Heading from the Gutenberg inserter.