Skip to content

Elementor Data Format

import { Aside } from ‘@astrojs/starlight/components’;

Elementor stores pages as a JSON array of sections. Understanding the structure is essential for building or editing pages programmatically.

Terminal window
# Check your site's layout mode
wp_site_info elementor_layout_mode
ModeStructure
section (Classic)section → column(s) → widget(s)
container (Flexbox)container → container(isInner:true) → widget(s)
[
{
"id": "sec1a2b3c",
"elType": "section",
"settings": {
"background_background": "classic",
"background_color": "#FFFFFF"
},
"elements": [
{
"id": "col1a2b3c",
"elType": "column",
"settings": { "_column_size": 100 },
"elements": [
{
"id": "wid1a2bc",
"elType": "widget",
"widgetType": "heading",
"settings": {
"title": "Hello World",
"header_size": "h1",
"align": "center"
}
}
]
}
]
}
]
{
"id": "sec2col",
"elType": "section",
"settings": { "structure": "20" },
"elements": [
{
"id": "col1",
"elType": "column",
"settings": { "_column_size": 50 },
"elements": []
},
{
"id": "col2",
"elType": "column",
"settings": { "_column_size": 50 },
"elements": []
}
]
}

structure values: "20" = 2-col, "30" = 3-col, "40" = 4-col. Columns must sum to 100.

[
{
"id": "cont1a2b",
"elType": "container",
"settings": { "content_width": "full" },
"elements": [
{
"id": "inner1a",
"elType": "container",
"settings": { "isInner": true },
"elements": [
{
"id": "wid1a2b",
"elType": "widget",
"widgetType": "heading",
"settings": { "title": "Hello" }
}
]
}
]
}
]
  1. Every element must have a unique id (8 alphanumeric characters). Missing IDs are auto-generated by the plugin.
  2. Use correct widget setting keys — wrong keys silently break rendering. Call wp_get_widget_schema to verify.
  3. Columns must sum to 100 in section mode.
  4. structure field is required on multi-column sections.
{
"success": true,
"warnings": [
"section[0].column[0].widget[0]: unknown widget 'headng' (did you mean 'heading'?)",
"section[0]: auto-generated missing ID"
],
"debug": {
"validation_fixes": [],
"validation_warnings": [],
"meta_verified": true
}
}

→ See Widget Reference for all available widget types and their settings keys.