Problem 1 to Fix 1
Finding a specific element meant reading every page one by one.
A Bricks site with 40 pages has hundreds of elements. Finding all instances of a specific heading, a CSS class, or a widget type required reading every page individually and scanning through the element tree. For AI agents, that is 40 API calls before any editing begins.
-
What the user experienced
Slow site-wide searches. AI had to read pages sequentially, consuming tokens and time to find a single element.
-
Why it happened
Element search was page-scoped. No cross-page query existed for Bricks content stored in
_bricks_page_content_2post meta. -
What shipped
search_bricks_elements queries all Bricks pages in one call. Search by element name (heading, image, button), CSS class, or text content. Returns matching elements with page IDs and tree positions.
-
Benefit
One API call replaces 40. AI finds every instance of a heading style, a CSS class, or a text string across the entire site instantly.
Search approach comparison
Finding all hero headings across a 40-page Bricks site
Get all 40 page IDs
Search each page individually for heading elements
41 API calls, sequential execution, thousands of tokens to find elements spread across the site.
Finds all headings across all pages in one query
1 API call. Results include page ID, element ID, content preview, and tree position for every match.
_bricks_page_content_2 meta for efficiency.
Search by element type, CSS class name, or text content.