bricks_create_theme_style
Overview
Creates a new theme style in Bricks Builder with optional display conditions and initial settings. Theme styles define site-wide typography, colors, link styles, contextual spacing, and per-element defaults.
Multiple theme styles can coexist — conditions control which applies where. Specificity scoring determines priority: specific page ID > front page > post type > entire site (« any »).
Use this when you need a separate visual style for specific sections of a site, such as a blog layout with different typography or a shop style with different button defaults.
Key Features
When to Use
Creating a secondary theme style for a specific section (e.g., blog, shop, landing pages)
When the default Bricks theme style needs to be replaced entirely
Building multi-layout sites where different page types need different typography or element defaults
Color palette should be set up first so theme style can reference color variables
Understanding of which pages/post types will use this style
When NOT to Use
When you only need one site-wide style — just update the existing "default" theme style
When making minor typography changes to the existing style
Parameters
labelstringREQUIREDstyle_idstringoptionalsettingsobjectoptionalconditionsarrayoptionalCode Examples
Create a blog-specific theme style
Create a theme style with different typography that only applies to blog posts.
{
"label": "Blog Style",
"settings": {
"typography": {
"typographyBody": {
"font-family": "Georgia",
"font-size": "18px",
"line-height": "1.8"
},
"typographyHeadingH1": {
"font-size": "42px",
"font-weight": "700",
"line-height": "1.2"
}
},
"container": {
"_width": "780px"
}
},
"conditions": [
{
"main": "postType",
"postType": ["post"]
}
]
}{
"success": true,
"style_id": "blog-style",
"message": "Theme style 'Blog Style' created successfully."
}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 1939
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
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 1939
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
Tip: For most sites, you only need one theme style with condition "any" (entire site). Only create additional styles if different sections of the site need fundamentally different typography or element defaults.
Tip: Condition specificity order (highest to lowest): specific page/post ID > front page > post type > entire site (« any »). This means a style targeting a specific page will always override a site-wide style.
Warning: Bricks uses "any" for entire-site conditions, NOT "entireSite". Similarly, use "frontPage" (camelCase), not "front_page".