• About Me
  • Skills
  • Education
  • Employment
  • Portfolio
  • Blog
  • Contact

Visual Composer: vc_map field examples

30 March 2021 / By Faizan Yasin
  • Home
  • Visual Composer: vc_map field examples
There’s a few things missing to the documentation for Visual composer, like samples of how to use each field type.  Some of these are probably pretty intuitive, but we figured we’d make some example for each as more of a library of snippets to pick for the vc_map function. Sometimes just an example of something that works for a type is all you need to feel more confident — Enjoy!  [VC Documentation] 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
array(
  "type" => "textarea_html",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
textfield/textarea Simple input / textarea field
array(
  "type" => "textfield",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => __( "", "my-text-domain" ),
  "description" => __( "Enter description.", "my-text-domain" )
)
array(
  "type" => "textarea",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => __( "", "my-text-domain" ),
  "description" => __( "Enter description.", "my-text-domain" )
)
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)
array(
  'type' => 'dropdown',
  'heading' => __( 'Field Label',  "my-text-domain" ),
  'param_name' => 'field_name',
  'value' => array(
    __( 'Option 1 Label',  "my-text-domain"  ) => 'option1value',
    __( 'Option 2 Label',  "my-text-domain"  ) => 'option2value',
    __( 'Option 3 Label',  "my-text-domain"  ) => 'option3value',
  ),
  "description" => __( "Enter description.", "my-text-domain" )
)
attach_image / attach_images Single image selection/Multiple images selection
array(
  "type" => "attach_image",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '',
  "description" => __( "Enter description.", "my-text-domain" )
)
array(
  "type" => "attach_images",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '',
  "description" => __( "Enter description.", "my-text-domain" )
)
posttypes Checkboxes with available post types (automatically finds all post types)
array(
  "type" => "posttypes",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => __( "", "my-text-domain" ),
  "description" => __( "Enter description.", "my-text-domain" )
)	
colorpicker Color picker
array(
  "type" => "colorpicker",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
exploded_textarea Text area, where each line will be imploded with comma (,)
array(
  "type" => "exploded_textarea",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
widgetised_sidebars Dropdown element with set of available widget regions, that are registered in the active wp theme
array(
  "type" => "widgetised_sidebars",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
textarea_raw_html Text area, its content will be coded into base64 (this allows you to store raw js or raw html code)
array(
  "type" => "textarea_raw_html",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
vc_link Link selection. Then in shortcodes html output, use $href = vc_build_link( $href ); to parse link attribute
array(
  "type" => "vc_link",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
checkbox Creates checkboxes, can have 1 or multiple checkboxes within one attribute
array(
  "type" => "checkbox",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => __( "", "my-text-domain" ),
  "description" => __( "Enter description.", "my-text-domain" )
)
loop Loop builder. Lets your users to construct loop which can later be used during the shortcode’s output
array(
  "type" => "loop",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
css Basic CSS style editor for your content element. Check “Add “Design Options” Tab with CSS Editor to Your Element” page for more details
array(
  "type" => "css",
  "class" => "",
  "heading" => __( "Field Label", "my-text-domain" ),
  "param_name" => "field_name",
  "value" => '', 
  "description" => __( "Enter description.", "my-text-domain" )
)
… attribute types can be extended with new custom types. SOURCE Create Your Own 

faizanyasn
Fiverr
Seller
I am Web developer, I’ve been in this field for about 6 years developing WordPress websites and throughout that time I’ve helped numerous businesses grow, attract new audiences and increase their revenue. I aim at delivering an outstanding experience and building long-term, mutually beneficial relationships with my clients.
My mission is to create a solution that helps you stand out from the competition and increase revenue. I can help with all aspects from road mapping the requirements of the site.

Categories
  • blog
  • ecommerce
  • Facebook
  • facebook audience insights
  • Fiverr
  • Freelancing
  • HTml
  • Meta Settings
  • Meta Tags
  • Opencart
  • Opencart Website
  • Payment gateway
  • SEO
  • Smm
  • social media marketing
  • Targetting facbook audiance
  • Uncategorized
  • Wordpress
About Me
about-me
Faizan Yasin

Hello, I am quite experienced and responsible developer with a technical background in Information Technology. I have been over four years in Website development. I’m looking for long-term and a win-win partnership. Hard work and dedication differ me from others. I’m available 24/7 no matter what and respond immediately. I am 100% responsible for what I’m doing because my goal is to make a customer happy. I’m looking forward to furthering communications!

Popular Post
  • Create A WPBakery Visual Composer Add-OnTuesday - March 30, 2021
  • Visual Composer: vc_map field examplesTuesday - March 30, 2021
  • Fix create_function() deprecated PHP function in WordPressWednesday - May 27, 2020
  • What to do if the “Network Admin” menu item not…Tuesday - August 20, 2019
  • PayPal Payment Gateway Integration in CodeIgniterMonday - July 29, 2019
Tags
All meta tags audiance insights Authorize.net Authorize.net integration custom wordpress development drag to reorder ecommerce development ecommerce store facebook facebook audiance insights fiverr fiverr wordpress fiverr wordpress customization freelancer html meta tags Meta tags multi site bug fix multisite network admin On page SEO Onpage seo opencart opencart development opengraph tags paypal codeigniter Paypal integration paypal integration codeigniter php php paypal integration reorder reorder table rows sortable tables wordpress development on fiverr
© 2018 All rights reserved.