Page Builder Support
Which WordPress page builders are supported and how each is transformed to Sanity Portable Text.
Support matrix
| Builder | Deterministic Parser | AI Fallback | Notes |
|---|---|---|---|
| Gutenberg | Full | N/A | Native block editor — direct mapping to Portable Text |
| Elementor | Full (known widgets) | Yes | Unknown widget types route to AI transform |
| WPBakery | Full (depth ≤ 3) | Yes | Shortcode parser; deeper nesting → AI fallback |
| Divi 4 | Full (common modules) | Yes | Shortcode parser |
| Divi 5 | Full (common blocks) | Yes | Block-comment parser (<!-- wp:divi/... -->) |
| Beaver Builder | Full (common modules) | Yes | Unserialized array tree walk |
How it works
Each post is analyzed for its builder. The plugin sends a _ad_builder_hint and the raw builder data (_elementor_data JSON, shortcodes, serialized arrays) in the webhook payload. The Worker dispatches to the matching deterministic parser.
Each parser returns a confidence score (0–1):
- ≥ 0.7 — deterministic output is used directly
- < 0.7 — the Worker calls the AI service
/api/transformroute, which uses thejsoncapability (deepseek-v4 → glm-5.2 → gpt-4o-mini) to convert the raw block to Portable Text - AI failure — falls back to the deterministic parser output (graceful degradation; the post still migrates)
Elementor
Known widgets map directly to Portable Text blocks:
| Elementor widget | Sanity block type |
|---|---|
heading | styled block |
text-editor | block array |
image | wpImage |
button | cta |
accordion | accordion |
video | video |
Unknown widget types decrement confidence. Broken JSON (failed json_decode) yields confidence 0 → AI fallback.
WPBakery
Shortcodes are tokenized and built into a tree capped at depth 3. Deeper nesting yields confidence 0 → AI fallback. Known shortcodes:
| WPBakery shortcode | Sanity block type |
|---|---|
vc_column_text | block array |
vc_single_image | wpImage |
vc_btn | cta |
vc_row / vc_column | columns |
Divi
Divi 4 (shortcodes)
Divi 4 shortcodes ([et_pb_section], [et_pb_row], [et_pb_text], etc.) are parsed with regex. Common modules map to blocks:
| Divi 4 module | Sanity block type |
|---|---|
et_pb_text | block array |
et_pb_image | wpImage |
et_pb_button | cta |
et_pb_accordion | accordion |
et_pb_toggle | accordion (single item) |
et_pb_divider / et_pb_spacer | divider |
Divi 5 (block comments)
Divi 5 migrated to the WordPress block-editor format. Content is stored as block comments (<!-- wp:divi/section -->...<!-- /wp:divi/section -->). The parser auto-detects Divi 5 vs Divi 4 based on the content signature and dispatches accordingly.
| Divi 5 block | Sanity block type |
|---|---|
divi/text | block array |
divi/image | wpImage |
divi/button | cta |
divi/accordion | accordion |
divi/toggle | accordion (single item) |
divi/divider / divi/spacer | divider |
Beaver Builder
Beaver Builder stores its layout as a serialized PHP array in _fl_builder_data. The plugin unserializes it and sends it as JSON. The parser walks the rows → columns → modules tree and maps known module types:
| Beaver module | Sanity block type |
|---|---|
heading | styled block (h1–h6) |
rich-text | block array |
photo | wpImage |
button | cta |
accordion | accordion |
separator / spacer | divider |
testimonial | blockquote |
callout | cta (info variant) |
video | block (URL) |
html | block array (stripped) |
If your site uses a builder not listed here, content will be parsed as Gutenberg (raw HTML → Portable Text). Run AI Cleanup after migration to refine the output.