Skip to content

Snippet: Disable WPBakery Page Builder Front-End Editor for Specific Post Type

// For backend
add_filter( 'admin_head', function() {
	global $current_screen;
	if ( $current_screen && 'my_post_type' == $current_screen->post_type ) {
		vc_disable_frontend();
	}
}, 1 );

// For front-end
add_filter( 'wp_head', function() {
	if ( is_singular( 'my_post_type' ) ) {
		vc_disable_frontend();
	}
}, 1 );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top