{"id":1006,"date":"2022-05-30T18:46:12","date_gmt":"2022-05-30T08:46:12","guid":{"rendered":"https:\/\/bricksextras.com\/?post_type=docs&#038;p=1006"},"modified":"2026-01-23T12:10:02","modified_gmt":"2026-01-23T01:10:02","slug":"shortcode-wrapper","status":"publish","type":"docs","link":"https:\/\/bricksextras.com\/docs\/shortcode-wrapper\/","title":{"rendered":"Shortcode Wrapper"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">The&nbsp;Shortcode Wrapper&nbsp;element allows you to wrap templates, or any collection of Bricks elements, in between the opening and closing tags of the specified shortcode. Ideal for conditional content and template restriction when using membership plugins.<\/p>\n\n\n\n<p><strong>Full shortcode<\/strong>&nbsp;\u2013 Add the entire shortcode, both the opening and closing tags with any parameters on the opening shortcode. eg <code>[mepr-active membership=\"1941\"][\/mepr-active]<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/bricksextras.b-cdn.net\/\/srv\/htdocs\/wp-content\/uploads\/2022\/05\/shortcode-wrapper.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-1024x683.jpg\" alt=\"\" class=\"wp-image-1070\" srcset=\"https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-1024x683.jpg 1024w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-466x311.jpg 466w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-300x200.jpg 300w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-768x512.jpg 768w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-1536x1025.jpg 1536w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper-600x400.jpg 600w, https:\/\/bricksextras.com\/wp-content\/uploads\/2022\/05\/shortcode-wrapper.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-up-triggers\">Wrapping Content<\/h2>\n\n\n\n<p>The content inside the shortcodes can be any of the following..<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Any Bricks Template<\/li>\n\n\n\n<li>Editor &#8211; add content directly inside of the settings panel.<\/li>\n\n\n\n<li>Nest Elements &#8211; Place any Bricks elements inside.<\/li>\n<\/ul>\n\n\n\n<p>The content inside will be output inside the shortcode and will take on those conditions of the shortcode. For eg.. hiding the content based on a user&#8217;s membership subscription etc.<\/p>\n\n\n\n<p><strong>Hide content in builder<\/strong>&nbsp;\u2013 Enable\/disable the content that is inside the shortcode wrapper. This is for when you have multiple versions of the same elements for different site visitors and want to hide some from inside of the builder (to prevent it from getting messy).<\/p>\n","protected":false},"featured_media":1070,"parent":0,"menu_order":0,"template":"","doc_type":[13,12],"doc_category":[32],"doc_status":[],"doc_supports":[],"class_list":["post-1006","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_type-elements","doc_type-featured","doc_category-theme-building"],"acf":[],"_links":{"self":[{"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/docs\/1006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/types\/docs"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/media\/1070"}],"wp:attachment":[{"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/media?parent=1006"}],"wp:term":[{"taxonomy":"doc_type","embeddable":true,"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/doc_type?post=1006"},{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/doc_category?post=1006"},{"taxonomy":"doc_status","embeddable":true,"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/doc_status?post=1006"},{"taxonomy":"doc_supports","embeddable":true,"href":"https:\/\/bricksextras.com\/wp-json\/wp\/v2\/doc_supports?post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}