Hi there,
looks like we can use this condition to determine if a page/post has WP Bakery enabled:
https://kb.wpbakery.com/docs/inner-api/vc_enabled_frontend/
So we could do this:
1. Set the Customizer > Layout > Sidebars to NO SIDEBARS.
2. Now Create a Layout Element that sets ALL posts to display a Sidebar. Make a note of the Elements ID whilst in the Element editor – you’ll find it in its URL.
3. Then we can add this PHP Snippet to filter that layout element so it does not apply to WP Bakery pages:
add_filter( 'generate_layout_element_display', function( $display, $element_id ) {
if ( 10 === $element_id && vc_enabled_frontend() ) {
$display = false;
}
return $display;
}, 10, 2 );
You need to change the 10
to ID of your layout element.