WPBakery Page Builder (formerly-Visual-Composer) - vc_map() field examples

I’ve been working with WPBakery Page Builder (formerly Visual Composer) for about one year now, and one of the most significant issues I had was to understand how each field type works. The documentation is lacking. To combat this, I had a file that was just examples of how to use and create those fields. When I don’t remember how to do something, I quickly open the file and find what parameters a field take. Hopefully, this will help you as much as it helps me.

textarea_html
Text area with default WordPress WYSIWYG Editor. Important: only one html_textarea is permitted per shortcode and it should have “content” as a param_name

textfield
Simple Input

textarea
Simple textarea field

dropdown
Dropdown input field with set of available options. Array containing the drop down values (either should be a normal array, or an associative array)

attach_image
Single image selection

attach_images
Multiple images selection

posttypes
Checkboxes with available post types (automatically finds all post types)

colorpicker
Color picker

exploded_textarea
Text area, where each line will be imploded with comma (,)

widgetised_sidebars
Dropdown element with set of available widget regions, that are registered in the active wp theme

textarea_raw_html
Text area, its content will be coded into base64 (this allows you to store raw js or raw html code)

vc_link
Link selection. Then in shortcodes html output, use $href = vc_build_link( $href ); to parse link attribute

checkbox
Creates checkboxes, can have 1 or multiple checkboxes within one attribute

loop
Loop builder. Lets your users to construct loop which can later be used during the shortcode’s output

css
Basic CSS style editor for your content element. Check “Add “Design Options” Tab with CSS Editor to Your Element” page for more details

Leave a Reply