# Enable Beaver Builder for Custom Post Types

> Turns Beaver Builder on for the custom post types you list, in addition to the ones ticked in its settings.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: beaver-builder, post-types, editor
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/beaver-builder-custom-post-types/

## Code

```php
// Post types that should get Beaver Builder.
$wpide_bb_post_types = array( 'portfolio', 'landing' );

add_filter( 'fl_builder_post_types', function ( $post_types ) use ( $wpide_bb_post_types ) {
    return array_values( array_unique( array_merge( (array) $post_types, $wpide_bb_post_types ) ) );
} );
```

## Notes

Use post type slugs; the post type must be public.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Enable Beaver Builder for Custom Post Types" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
