If you often use the Divi Builder but have a some pages that do not utilize it, you might want to hide the "Enable Visual Builder" link from the admin bar on these pages. This can help prevent clients from accidentally enabling the Divi Builder on these pages.
Here's how you can hide the "Enable Visual Builder" button in the admin bar, but only on pages that do not use the Divi Builder.
Hide the "Enable Visual Builder" Link using CSS
To hide the "Enable Visual Builder" link from the admin bar on Gutenberg / block editor pages, add the following CSS to the "WP Admin > Divi > Theme Options > General > Custom CSS" box:
body:not(.et_pb_pagebuilder_layout) #wp-admin-bar-et-use-visual-builder {
display: none;
}
This CSS rule targets the "Enable Visual Builder" button in the admin bar and hides it on pages that do not have the Divi Builder activated.
By implementing this solution, you ensure that the Divi Builder button only appears where it is relevant, maintaining a cleaner and more intuitive interface for your clients.
0 Comments