bricks_get_page_settings
Overview
Retrieves the complete Bricks page settings for a specific page. Returns SEO metadata (document title, meta description, meta keywords, robots directives), Open Graph social sharing data, custom CSS, custom scripts for header and footer injection points, body classes, and layout overrides (header/footer disabled flags).
This is a read-only tool used to inspect the current page configuration before making changes with bricks_update_page_settings, or to verify that settings were applied correctly after an update.
Key Features
When to Use
To verify that SEO or Open Graph settings were applied correctly
To audit page-level custom CSS and scripts across the site
When debugging layout issues related to header/footer overrides
When NOT to Use
To get a high-level page overview — use bricks_get_page_summary instead
Parameters
page_idnumberREQUIREDCode Examples
Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12
Inspect settings before updating
Read existing page settings to check what SEO configuration already exists before making changes.
// Check current settings
const settings = bricks_get_page_settings({ page_id: 42 });
// Returns: { documentTitle: "...", metaDescription: "...", customCss: "...", ... }
// Now safely update only what is missing
bricks_update_page_settings({
page_id: 42,
settings: {
metaDescription: 'Updated description for the page.'
}
})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 2018
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
Tips & Warnings
Read-only: This tool only reads settings. To modify them, use bricks_update_page_settings with the same page_id.
Empty fields: Settings that have never been configured will return as empty strings or null. This is normal and does not indicate an error.