Custom element is always full width in WPBakery / Visual Composer

I'm using the WordPress plugin WPBakery (was Visual Composer), where I've created custom elements.

In the editor side, any element can be placed in a row and it's columns can be defined from there, Is there a way to stop that?

For example, I have a custom element called hero . This block will always be col-12 and prevent anything from being places besides this block.

Trying to prevent this:

enter image description here

Is this possible?

Solutions

I found the solution.

I added "ob_start" and "return ob_get_clean();" between file inclusion and that is work for me.

public static function output($atts, $content = null)
{
    extract(vc_map_get_attributes('myModule', $atts));
    ob_start();
    include_once('partials/public-display.php');
    return ob_get_clean();
}

Similar questions

How to allow code like PHP, SQL, HTML to WPBakery Visual Composer?
I want to allow code inside a textarea to write code with PHP, SQL or HTML... What i want to do is create an element inside the Visual Composer where I can put some code to show it as i write it on my posts. Here you can find the type values: https://kb.wpbakery.com/docs/inner-api/vc_map/ But no one of these works for me. There is a proper way to d...
dokan plugin conflict with wpbakery page builder (Visual Composer)
in my WordPress website i found that wpbakery page builder doesn't work correctly while Dokan plugin is enabled. for example when we add a text block, the editor is not loaded and sometime text block is not loaded at all. when we disable Dokan plugin, it works good. is it possible to correct such inconsistencies by altering any configuration files ...
WPBakery Visual Composer keeps loading forever
I'm trying to edit a page with Visual Composer, But the page keeps loading, The preloader keeps loading the plugin logo. Here is a screenshot of the issue: The console errors: How to solve this issue?
How to enable Wpbakery Page Builder(Visual Composer) in CMB2 "wysiwyg" type?
I am adding a custom metabox text editor in wordpress with CMB2 for post type. Here Wpbakery Page Builder(Visual Composer) is enabled in default post type editor. but i can't able to enable Wpbakery Page Builder(Visual Composer) in custom post editor which i have implemented with CMB2 metabox. It has been implemented with "wysiwyg" type. Is there a...
WpBakery (Visual Composer) - Responsive best practices
I'm using wpbakery wordpress plugin. I added in design options padding and generated css code looks like: I need to remove padding on smaller screen sizes. My question is, what is best practice to do that? Simple media query like this or there is better way?
WPBakery Visual Composer not loading
Im using the latest Wordpress version. Since GUTENBERG the Visual Composer is not working. I installed Classic Editor plugin. But it brought nothing. Also the Theme Customizer is not loading. Here you will find the error messages from the Console: Theme: ColorMag

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy .