Filter: bricks/builder/supported_post_types
Filters the list of post types that are enabled for editing with Bricks. This checks whether the builder should load for the current post type.
Parameters
Section titled “Parameters”$supported_post_types(array): Array of supported post type slugs (e.g.,['page', 'post', 'my_cpt']).$current_post_type(string): The post type of the post being accessed.
Example usage
Section titled “Example usage”add_filter( 'bricks/builder/supported_post_types', function( $supported_post_types, $current_post_type ) { // Example: Always allow 'my_custom_post_type' to be edited with Bricks if ( $current_post_type === 'my_custom_post_type' && ! in_array( 'my_custom_post_type', $supported_post_types ) ) { $supported_post_types[] = 'my_custom_post_type'; }
return $supported_post_types;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Thanks for sharing feedback. We're using it to improve these docs.