Skip to content

Enable or Disable WPBakery Page Builder for Post Types

In this article

    To enable or disable the WPBakery Page Builder for your custom post types simply go to WPBakery Page Builder > Role Manager and under the user role you want to set the post types for, select “Custom” then check all the post types you want to use the WPBakery to be enabled for.

    Disabling WPBakery Using Code

    While you can use the Role Manager to set the post types available for WPBakery on a per-user role, it really doesn’t make much sense. For the most part if you are going to disable WPBakery for a post type it will be done for all roles.

    Additionally, if you are a super-admin WPBakery appears to be enabled for every post type regardless of your user role settings – which we believe is a bug and have reported it before, but I don’t think the plugin developers see it as a bug.

    The following snippet can be used to disable WPBakery completely for specific post types:

    /**
     * Disable WPBakery for specific post types.
     */
    add_filter( 'vc_check_post_type_validation', function( $check, $post_type ) {
    	$now_allowed = [
    		'post_type_1',
    		'post_type_2',
    		'post_type_3',
    	];
    
    	if ( in_array( $post_type, $not_allowed, true ) ) {
    		$check = false;
    	}
    
    	return $check;
    } );
    Related Articles
    Back To Top