back to Themify.me

Flow Snippets

Disable Flow Content Builder for selected Post Type(s)

The Flow Content Builder panel is a page builder tool built right within Flow theme and can be used to create the content for that post. By default it is enabled for all post types, if you wish to disable it for particular post type(s) you can use:

<?php

function custom_disable_content_builder( $post_types ) {
	$types = array( 'page' );

	foreach( $types as $type ) {
		if( false !== ( $key = array_search( $type, $post_types ) ) ) {
			unset( $post_types[$key] );
		}
	}

	return $post_types;
}
add_filter( 'tf_builder_metabox_screens', 'custom_disable_content_builder', 20 );
The snippet disables the panel for “page” post type. The $types array can be modified to include the post types you don’t want to show the panel on.