I have Beaver Builder used as a home page. The page layout is broken. The Beaver Builder editor loads, but it will not allow editing. When deactivating Toolset Blocks, the layout style returns and I am able to edit the page. I tried rolling back the versions of both Beaver builder and Toolset Blocks, but it did not resolve the issue.
Link to a page where the issue can be seen: hidden link
Screen recording of behavior: hidden link
I'm adding a temp login to a staging site. You can work with plugins and add snippets if needed.
Hello. Thank you for contacting the Toolset support.
Can you please check now:
- hidden link
When I edit your home page, on the right sidebar with the "Content Template" section there was a content template assigned "FULL Width Page Template" and I set it to "None" and saved the page and I can see the homepage without any issue.
Thank you for your response. It's been a while since I set this up. So this is a very recent problem. I have two questions:
1. Does Toolset blocks load on all the templates created with Toolset? If I need a special template for a Beaver Builder page, will I have issues?
2. I found this snippet works without issue. Do you see any problem using this to remove Toolset from Beaver Builder pages?
add_action( 'wp', function() {
// Make sure Beaver Builder is installed and active
if ( ! class_exists( 'FLBuilderModel' ) ) {
return;
}
// Check if we are currently using the BB editor OR rendering a BB layout on the front end
$is_bb_edit = FLBuilderModel::is_builder_active();
$is_bb_layout = FLBuilderModel::is_builder_enabled();
if ( $is_bb_edit || $is_bb_layout ) {
// 1. Tell Toolset Views/Blocks to NOT force its content template on this page
add_filter( 'wpv_filter_force_template', '__return_false', 9999 );
// 2. Loop through the content filters and remove Toolset's rendering hooks
global $wp_filter;
if ( isset( $wp_filter['the_content'] ) ) {
foreach ( $wp_filter['the_content']->callbacks as $priority => $callbacks ) {
foreach ( $callbacks as $id => $callback ) {
if ( is_array( $callback['function'] ) && is_object( $callback['function'][0] ) ) {
$class_name = get_class( $callback['function'][0] );
// If the filter belongs to a Toolset or Views class, remove it
if ( strpos( $class_name, 'Toolset' ) !== false || strpos( $class_name, 'WPV_' ) !== false ) {
remove_filter( 'the_content', $callback['function'], $priority );
}
}
}
}
}
}
}, 10 ); // Run on the 'wp' hook so the page data is fully loaded before checking
1. Does Toolset blocks load on all the templates created with Toolset? If I need a special template for a Beaver Builder page, will I have issues?
===>
The thing is that - you can build Toolset content template two ways:
- Using Block mode
- Using Classic mode
We do not recommond to mix two builders like [Toolset blocks and Beaver Builer] as sooner or later it may create issues.
2. I found this snippet works without issue. Do you see any problem using this to remove Toolset from Beaver Builder pages?
==>
The code you shared is custom code and custom solution, if you see that works for you, you can keep using it but you will have to fix it if anything stop working as you know the best as you wrote the code not us.