WPBakery Page Builder get custom css from design options
I have a page with a theme that integrates WPBakery Page Builder. The theme creates a single page layout by adding together different pages.
The single pages itself have some custom design options, e.g. row paddings, margins, background-image, etc.
If I open one page alone, I can see the custom css applied.
But in the one-page-layout, those custom design options are not applied.
From the HTML I can see that the custom CSS that is generated in the single page is not generated in the one-page-layout (which consists of multiple pages).
My idea is to tweak the theme and manually add the CSS - but it has been months since I worked with Wordpress programatically, so I hope someone can give me a hint.
How can I programatically get the CSS code that WPBakery creates for a page's design options? Somewhere in WPBakery, it must take the design options stored in the shortcodes and add it to the head.
I hope the problem is understandable :-)
Solutions
The css is in the meta _wpb_shortcodes_custom_css.
I used this to solve a similar issue :
<style type="text/css" data-type="vc_shortcodes-custom-css"><?php echo get_post_meta( 17250, '_wpb_shortcodes_custom_css', true ); ?></style>
Similar questions
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 Page Builder not rendering shortcodes on WooCommerce Product Category pages
I'm developing quite a complex theme in which I have created custom post types for "Headers" and "Footers" for which I have enabled WPBakery Page Builder (currently using v5.5.5 in Wordpress 4.9.8). In header.php, the Header post is pulled in and rendered inside the <header> tag, and then in footer.php the Footer post is pulled in and rendere...
WPBakery Page Builder with taxonomy dropdown not working
I am trying to build a custom element for WPBakery Page Builder with a dropdown where custom taxonomy elements (categories) are listed. Unfortunately I end up with empty dropdown elements. What am I doing wrong here? The $options array gets filled perfectly when I var_dump it. This is my params array inside the vc_map() function:
WPBakery Page Builder - Checkboxes won't retain values from v6.xx
For the last few years I have been developing a custom theme and various plugins that add options to WPBakery Page Builder elements and create new custom elements, etc. Everything has worked perfectly up to Page Builder v5.7. But then when v6.0.x came out, suddenly every Checkbox option I have added to every element, be it a custom element or one o...
Also ask