Skip to content
Get Bricks

Content Area Schema

A content area is a flat array of element objects. Bricks uses three independent content areas per page (header, content, and footer), each stored in its own post meta key. The array is flat (not nested): parent-child relationships are expressed via the parent and children fields on each element.

For the structure of each element in the array, see the Element schema.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bricks://global/content-area",
"schemaVersion": "2.2.1",
"title": "Bricks Content Area",
"description": "A Bricks content area (header, content, or footer) is a flat array of elements with parent-child references.",
"type": "array",
"items": {
"type": "object",
"_ref": "See the Element structure section in the data model overview.",
"description": "A Bricks element as stored in any content area (header, content, footer). Properties: id, name, parent, children, settings, selectors, label, themeStyles."
}
}

A Bricks page (or any post type using Bricks) stores its elements across three independent content areas:

Content areaWordPress post meta keyDescription
Header_bricks_page_header_2Header template elements
Content_bricks_page_content_2Main page/post content
Footer_bricks_page_footer_2Footer template elements

All three use the exact same data structure: an array of elements as described in the Element schema.

These are stored as serialized arrays in the wp_postmeta table.

DataMeta keyPHP constant
Header elements_bricks_page_header_2BRICKS_DB_PAGE_HEADER
Content elements_bricks_page_content_2BRICKS_DB_PAGE_CONTENT
Footer elements_bricks_page_footer_2BRICKS_DB_PAGE_FOOTER

Elements reference each other by ID rather than nesting physically. A root-level element has "parent": 0; all others reference their parent’s id. The children array on each element lists its direct children in order. This makes it easy to reorder, move, or flatten elements without restructuring a tree.

[
{ "id": "aaa111", "name": "section", "parent": 0, "children": ["bbb222"], "settings": {} },
{ "id": "bbb222", "name": "heading", "parent": "aaa111", "children": [], "settings": { "text": "Hello" } }
]

The array may also contain component instances (identifiable by the presence of a cid field). See Components for details.