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.
Opens WPIDE on
Code
// 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 add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.