bricks_search_content
Phase 5BeginnerRead OnlyComplexity: 3/10
Full-text search across all pages and templates
Overview
Performs full-text search across all Bricks pages and templates. Finds elements containing the search query in text, code, content, accordion, and list fields. Useful for finding placeholder text (e.g., « Lorem ipsum »), specific content, or verifying text consistency across the site. Returns up to 100 matches with page and element context.
Key Features
Site-wide search
Searches across all Bricks pages and templates in a single call, covering text, code, accordion, and list element fields.
Page filtering
Optionally limit the search to specific page IDs or element types for targeted results.
Case sensitivity control
Supports both case-sensitive and case-insensitive matching.
Rich context
Returns page title, element type, element ID, and the matched text snippet for each result.
When to Use
When searching for placeholder text like "Lorem ipsum" across the entire site
When verifying that specific content appears (or does not appear) on any page
When finding all instances of a brand name, phone number, or address for bulk updates
When auditing content consistency across multiple pages
After a redesign to ensure no old content remains
When verifying that specific content appears (or does not appear) on any page
When finding all instances of a brand name, phone number, or address for bulk updates
When auditing content consistency across multiple pages
After a redesign to ensure no old content remains
Prerequisites
At least one page or template with Bricks content must exist
When NOT to Use
When searching for elements by structure/type — use bricks_get_page_content instead
When looking for a specific element by ref name — use bricks_get_element_by_ref instead
When checking link URLs — use bricks_scan_links instead
When looking for a specific element by ref name — use bricks_get_element_by_ref instead
When checking link URLs — use bricks_scan_links instead
Parameters
4 Total Parameters1 Required3 Optional
querystringREQUIREDSearch string to find across all pages and templates.
page_idsarrayoptionalLimit search to specific page IDs. Omit to search all pages and templates.
element_typesarrayoptionalLimit to specific element types (e.g., ["heading", "text-basic"]).
case_sensitivebooleanoptionalUse case-sensitive matching.
Default:
falseCode Examples
Warning: Undefined array key "example_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 10
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Find all Lorem ipsum placeholder text
JSON
{
"tool": "bricks_search_content",
"params": {
"query": "Lorem ipsum",
"case_sensitive": false
}
}Response
{
"total": 3,
"matches": [
{
"page_id": 45,
"page_title": "About Us",
"element_id": "abc123",
"element_type": "text-basic",
"field": "text",
"snippet": "Lorem ipsum dolor sit amet..."
},
{
"page_id": 45,
"page_title": "About Us",
"element_id": "def456",
"element_type": "text-basic",
"field": "text",
"snippet": "...consectetur adipiscing elit. Lorem ipsum..."
}
]
}Common Mistakes
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Always run bricks_search_content with query "Lorem ipsum" as part of the Phase 5 audit to catch any remaining placeholder text.
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
For large sites, filtering by element_types (e.g., only "heading" and "text-basic") can significantly reduce noise and speed up the search.
Tips & Warnings
Tips & Warnings
Audit workflow: Run bricks_search_content with these queries as part of your final audit: « Lorem ipsum », « placeholder », « TODO », « FIXME », « example.com ». This catches common leftover placeholder content.
Limit: Returns up to 100 matches. If you suspect more exist, narrow the search with page_ids or element_types filters.
Return Values
Related Tools
Technical Details
Changelog
v1.0
Initial release
20250101