bricks_add_element
Add a single element to a page, automatically appending it to its parent element and providing validation warnings.
Instructions
Add a single element to a page. Appends to existing elements. If the element has a parent, it will be added to the parent's children array automatically. Includes validation warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site key for multi-site support. Available: main. Defaults to "main". | |
| post_id | Yes | The page/post ID | |
| element | Yes | Bricks element object with name, settings, parent. ID will be auto-generated if not provided. | |
| post_type | No | Post type slug. Use "pages" for pages, "posts" for posts, or any registered CPT slug (e.g., "product", "portfolio"). Defaults to "pages". |