bricks_list_pages
Overview
List all Bricks-enabled pages with their status, template info, element counts, and whether the Bricks editor is active. This is more detailed than the standard WordPress page list because it includes Bricks-specific metadata such as the number of elements on each page.
Use this tool as a first step when exploring an existing site to understand which pages already exist, what state they are in, and how complex their content is. Supports filtering by status, searching by title, and paginated results.
Key Features
When to Use
You want to find a specific page by title search
You need to check which pages are published vs. draft before going live
You want to understand the site structure and page hierarchy
Phase 1 reconnaissance: always call this early to avoid creating duplicate pages
When NOT to Use
You need the full element tree of a specific page (use bricks_get_page_content instead)
You want a condensed section-by-section overview (use bricks_get_page_summary instead)
Parameters
statusstringoptionalany Values: publish, draft, pending, private, trash, anyper_pagenumberoptional50pagenumberoptional1searchstringoptionalorderbystringoptionalmodified Values: date, title, modifiedorderstringoptionaldesc Values: asc, descCode Examples
List all published pages
Get all published Bricks pages sorted by most recently modified.
bricks_list_pages({
status: "publish",
orderby: "modified",
order: "desc"
}){
"pages": [
{ "id": 33, "title": "Home", "status": "publish", "slug": "home", "element_count": 45 },
{ "id": 42, "title": "About", "status": "publish", "slug": "about", "element_count": 28 }
],
"total": 2
}Search for a specific page
Find pages with "contact" in the title.
bricks_list_pages({
search: "contact",
status: "any"
}){
"pages": [
{ "id": 55, "title": "Contact Us", "status": "draft", "slug": "contact-us", "element_count": 12 }
],
"total": 1
}Common Mistakes
bricks_create_page({ title: "About" })
// Might create a duplicate!bricks_list_pages({ search: "About" })
// Check results first, then create only if neededwp_list_posts({ post_type: "pages" })
// Missing element countsbricks_list_pages({ status: "any" })
// Includes element_count per pageTips & Warnings
Phase 1 Essential: This is one of the first tools to call when working with a Bricks site. It gives you the lay of the land before making any changes.
Element Count Insight: The element_count field tells you how complex each page is. Pages with 0 elements are empty and ready for content. Pages with 50+ elements are already built out.
Pagination: For sites with many pages, increase per_page to 100 or use pagination to ensure you see everything.