Filter: bricks/active_templates
Filters the array of active templates (header, footer, content, popup) that Bricks has determined should be rendered for the current page.
Parameters
Section titled “Parameters”$active_templates(array): Array of active template IDs, keyed by template type (e.g.,header,footer,content,popup).$post_id(int): The current post ID being rendered.$content_type(string): The type of content being rendered (e.g.,content,archive,search,error).
Example usage
Section titled “Example usage”add_filter( 'bricks/active_templates', function( $active_templates, $post_id, $content_type ) { // Example: Use a specific header template (ID: 1234) for single posts if ( is_single() ) { $active_templates['header'] = 1234; }
return $active_templates;}, 10, 3 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.