{"id":1260,"date":"2025-06-17T13:33:52","date_gmt":"2025-06-17T10:33:52","guid":{"rendered":"https:\/\/kb.wpbakery.com\/?post_type=docs&#038;p=1260"},"modified":"2025-06-19T11:31:53","modified_gmt":"2025-06-19T08:31:53","slug":"vc_get_shortcode","status":"publish","type":"docs","link":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/","title":{"rendered":"vc_get_shortcode()"},"content":{"rendered":"\n<p>SINCE 4.4.3<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php vc_get_shortcode($tag)?&gt;<\/pre>\n<p>Get the settings of the mapped shortcode.<\/p>\n<h3>Params<\/h3>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 25%;\">Param name<\/td>\n<td style=\"width: 25%;\">Type<\/td>\n<td style=\"width: 16.9048%;\">Required<\/td>\n<td style=\"width: 33.0952%;\">Description<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 25%;\">$tag<\/td>\n<td style=\"width: 25%;\">String<\/td>\n<td style=\"width: 16.9048%;\">Yes<\/td>\n<td style=\"width: 33.0952%;\">The base tag name of the element shortcode.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example<\/h3>\n<p>You can return the shortcode settings previously mapped with <a href=\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_map\/\">vc_map()<\/a> function. For example, it can be useful if you want to create a new element with the same parameters that already exist, but with some modified settings.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php \nadd_action( 'vc_after_init', 'custom_vc_after_init' ); \n\nfunction custom_vc_after_init() { \n   $params = vc_get_shortcode('vc_copyright'); \n\n   $params['name'] = 'Copyright Update'; \n   $params['base'] = 'copyright_update'; \n   array_pop($params['params']); \n\n   vc_map( $params ); \n} \n?&gt;<\/pre>\n<p>\u00a0<\/p>\n<h3>Code Explanation<\/h3>\n<p>We created a new element, &#8220;Copyright Update&#8221; with the same parameters as the already existing &#8220;Copyright&#8221; element. But without the &#8216;Design Options&#8217; tab.<\/p>\n","protected":false},"featured_media":0,"parent":207,"menu_order":17,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1260","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_get_shortcode() - 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_get_shortcode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"vc_get_shortcode() - WPBakery Page Builder Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"SINCE 4.4.3 &lt;?php vc_get_shortcode($tag)?&gt; Get the settings of the mapped shortcode. Params Param name Type Required Description $tag String Yes The base tag name of the element shortcode. Example You can return the shortcode settings previously mapped with vc_map() function. For example, it can be useful if you want to create a new element with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/\" \/>\n<meta property=\"og:site_name\" content=\"WPBakery Page Builder Knowledge Base\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-19T08:31:53+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_get_shortcode\/\",\"url\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/\",\"name\":\"vc_get_shortcode() - WPBakery Page Builder Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/kb.wpbakery.com\/#website\"},\"datePublished\":\"2025-06-17T10:33:52+00:00\",\"dateModified\":\"2025-06-19T08:31:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/#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_get_shortcode()\"}]},{\"@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_get_shortcode() - 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_get_shortcode\/","og_locale":"en_US","og_type":"article","og_title":"vc_get_shortcode() - WPBakery Page Builder Knowledge Base","og_description":"SINCE 4.4.3 &lt;?php vc_get_shortcode($tag)?&gt; Get the settings of the mapped shortcode. Params Param name Type Required Description $tag String Yes The base tag name of the element shortcode. Example You can return the shortcode settings previously mapped with vc_map() function. For example, it can be useful if you want to create a new element with [&hellip;]","og_url":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/","og_site_name":"WPBakery Page Builder Knowledge Base","article_modified_time":"2025-06-19T08:31:53+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_get_shortcode\/","url":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/","name":"vc_get_shortcode() - WPBakery Page Builder Knowledge Base","isPartOf":{"@id":"https:\/\/kb.wpbakery.com\/#website"},"datePublished":"2025-06-17T10:33:52+00:00","dateModified":"2025-06-19T08:31:53+00:00","breadcrumb":{"@id":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_get_shortcode\/#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_get_shortcode()"}]},{"@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\/1260","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=1260"}],"version-history":[{"count":18,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1260\/revisions"}],"predecessor-version":[{"id":1361,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1260\/revisions\/1361"}],"up":[{"embeddable":true,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/207"}],"next":[{"title":"vc_update_shortcode_param()","link":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_update_shortcode_param\/","href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/1283"}],"prev":[{"title":"vc_shortcodes_theme_templates_dir()","link":"https:\/\/kb.wpbakery.com\/docs\/inner-api\/vc_shortcodes_theme_templates_dir\/","href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/docs\/239"}],"wp:attachment":[{"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/media?parent=1260"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.wpbakery.com\/wp-json\/wp\/v2\/doc_tag?post=1260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}