{"id":1276,"date":"2025-06-17T13:38:48","date_gmt":"2025-06-17T10:38:48","guid":{"rendered":"https:\/\/kb.wpbakery.com\/?post_type=docs&#038;p=1276"},"modified":"2025-06-17T16:45:00","modified_gmt":"2025-06-17T13:45:00","slug":"vc_add_shortcode_param","status":"publish","type":"docs","link":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/","title":{"rendered":"vc_add_shortcode_param()"},"content":{"rendered":"\n<p>SINCE 4.4<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php vc_add_shortcode_param($name, $form_field_callback, $script_url = null)?&gt;<\/pre>\n<p>Helper function to register a new shortcode attribute.<\/p>\n<h3>Params<\/h3>\n<table style=\"border-collapse: collapse; width: 100%; height: 92px;\">\n<tbody>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">Param name<\/td>\n<td style=\"width: 25%; height: 23px;\">Type<\/td>\n<td style=\"width: 11.7857%; height: 23px;\">Required<\/td>\n<td style=\"width: 38.2143%; height: 23px;\">Description<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">$name<\/td>\n<td style=\"width: 25%; height: 23px;\">String<\/td>\n<td style=\"width: 11.7857%; height: 23px;\">Yes<\/td>\n<td style=\"width: 38.2143%; height: 23px;\">Attribute name.<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">$integrated_shortcode<\/td>\n<td style=\"width: 25%; height: 23px;\">String<\/td>\n<td style=\"width: 11.7857%; height: 23px;\">Yes<\/td>\n<td style=\"width: 38.2143%; height: 23px;\">The callback will be called when the settings form is shown and the attribute is added to the shortcode.<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">$script_url<\/td>\n<td style=\"width: 25%; height: 23px;\">String<\/td>\n<td style=\"width: 11.7857%; height: 23px;\">No<\/td>\n<td style=\"width: 38.2143%; height: 23px;\">JavaScript file URL, which will be attached at the end of the settings form.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<p>To see an example of how to create a new param type shortcode param, please visit our <a href=\"https:\/\/kb.wpbakery.com\/docs\/developers-how-tos\/create-new-param-type\/\">developers \u201cHow To\u2019s\u201d<\/a> section.<\/p>\n","protected":false},"featured_media":0,"parent":207,"menu_order":26,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1276","docs","type-docs","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"SINCE 4.4 &lt;?php vc_add_shortcode_param($name, $form_field_callback, $script_url = null)?&gt; Helper function to register a new shortcode attribute. Params Param name Type Required Description $name String Yes Attribute name. $integrated_shortcode String Yes The callback will be called when the settings form is shown and the attribute is added to the shortcode. $script_url String No JavaScript file URL, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/\" \/>\n<meta property=\"og:site_name\" content=\"WPBakery Page Builder Knowledge Base\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-17T13:45:00+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/\",\"url\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/\",\"name\":\"vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/kb.wpbakery.com\/#website\"},\"datePublished\":\"2025-06-17T10:38:48+00:00\",\"dateModified\":\"2025-06-17T13:45:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kb.wpbakery.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inner API\",\"item\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"vc_add_shortcode_param()\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.wpbakery.com\/#website\",\"url\":\"https:\/\/kb.wpbakery.com\/\",\"name\":\"WPBakery Page Builder Knowledge Base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.wpbakery.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.wpbakery.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.wpbakery.com\/#organization\",\"name\":\"WPBakery Page Builder\",\"url\":\"https:\/\/kb.wpbakery.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.wpbakery.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.wpbakery.com\/wp-content\/uploads\/2018\/01\/wpb-logo.png\",\"contentUrl\":\"https:\/\/kb.wpbakery.com\/wp-content\/uploads\/2018\/01\/wpb-logo.png\",\"width\":312,\"height\":46,\"caption\":\"WPBakery Page Builder\"},\"image\":{\"@id\":\"https:\/\/kb.wpbakery.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/","og_locale":"en_US","og_type":"article","og_title":"vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base","og_description":"SINCE 4.4 &lt;?php vc_add_shortcode_param($name, $form_field_callback, $script_url = null)?&gt; Helper function to register a new shortcode attribute. Params Param name Type Required Description $name String Yes Attribute name. $integrated_shortcode String Yes The callback will be called when the settings form is shown and the attribute is added to the shortcode. $script_url String No JavaScript file URL, [&hellip;]","og_url":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/","og_site_name":"WPBakery Page Builder Knowledge Base","article_modified_time":"2025-06-17T13:45:00+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/","url":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/","name":"vc_add_shortcode_param() - WPBakery Page Builder Knowledge Base","isPartOf":{"@id":"https:\/\/kb.wpbakery.com\/#website"},"datePublished":"2025-06-17T10:38:48+00:00","dateModified":"2025-06-17T13:45:00+00:00","breadcrumb":{"@id":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_add_shortcode_param\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kb.wpbakery.com\/"},{"@type":"ListItem","position":2,"name":"Inner API","item":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/"},{"@type":"ListItem","position":3,"name":"vc_add_shortcode_param()"}]},{"@type":"WebSite","@id":"https:\/\/kb.wpbakery.com\/#website","url":"https:\/\/kb.wpbakery.com\/","name":"WPBakery Page Builder Knowledge Base","description":"","publisher":{"@id":"https:\/\/kb.wpbakery.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.wpbakery.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.wpbakery.com\/#organization","name":"WPBakery Page Builder","url":"https:\/\/kb.wpbakery.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.wpbakery.com\/#\/schema\/logo\/image\/","url":"https:\/\/kb.wpbakery.com\/wp-content\/uploads\/2018\/01\/wpb-logo.png","contentUrl":"https:\/\/kb.wpbakery.com\/wp-content\/uploads\/2018\/01\/wpb-logo.png","width":312,"height":46,"caption":"WPBakery Page Builder"},"image":{"@id":"https:\/\/kb.wpbakery.com\/#\/schema\/logo\/image\/"}}]}},"comment_count":0,"_links":{"self":[{"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/comments?post=1276"}],"version-history":[{"count":3,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1276\/revisions"}],"predecessor-version":[{"id":1358,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1276\/revisions\/1358"}],"up":[{"embeddable":true,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/207"}],"prev":[{"title":"vc_map_integrate_parse_atts()","link":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_map_integrate_parse_atts\/","href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1274"}],"wp:attachment":[{"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/media?parent=1276"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/doc_tag?post=1276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}