bricks_list_custom_elements
Overview
Lists all registered custom Bricks elements with their names, labels, categories, and control summaries. This tool provides a quick inventory of all PHP-based custom elements that have been created via bricks_create_custom_element.
Use this tool to discover what custom elements are available before deciding whether to create a new one or reuse an existing element. It returns a summary view — for full details including render template and CSS, use bricks_read_custom_element on a specific element.
Key Features
When to Use
When auditing the site to understand what custom elements are registered
To get a quick inventory of all custom PHP elements in the child theme
Custom elements must have been previously created with bricks_create_custom_element
When NOT to Use
When you need to list components (not custom PHP elements) — use bricks_get_components
Parameters
(none)noneoptionalCode Examples
List all custom elements
Get a summary of all registered custom elements.
bricks_list_custom_elements(){
"data": [
{
"name": "pricing-card",
"label": "Pricing Card",
"category": "custom",
"controls": [
{ "key": "plan_name", "type": "text", "label": "Plan Name" },
{ "key": "price", "type": "text", "label": "Price" },
{ "key": "features", "type": "repeater", "label": "Features" }
]
}
]
}Common Mistakes
// Looking for components here
bricks_list_custom_elements()
// This only lists PHP elements, not components!// For components:
bricks_get_components()
// For custom PHP elements:
bricks_list_custom_elements()Tips & Warnings
Summary only: This tool returns a summary. To see the full render template, CSS, and builder template for a specific element, use bricks_read_custom_element({ name: "element-name" }).
Child theme files: Custom elements are stored as PHP files in the child theme. The list reflects what is currently registered and loaded.