{"id":14872,"date":"2025-11-12T12:01:27","date_gmt":"2025-11-12T17:01:27","guid":{"rendered":"https:\/\/www.med.unc.edu\/webguide\/?page_id=14872"},"modified":"2026-04-06T11:56:50","modified_gmt":"2026-04-06T15:56:50","slug":"shortcode","status":"publish","type":"page","link":"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/shortcode\/","title":{"rendered":"What is Shortcode"},"content":{"rendered":"<p>Shortcode is a small piece of code enclosed in square brackets that displays dynamic content or styles content without requiring any HTML.<\/p>\n<p>Shortcodes are widely used across School of Medicine (SOM) websites to add content such as forms, tables, directories, buttons, and stylized content. They make it easy to add complex or styled features while keeping content consistent, accessible, and easy to maintain.<\/p>\n<div class = \"alert alert-info  oscitas-bootstrap-container\">\n<p><strong>If you edit a page and don\u2019t see the text or images that appear on the live site, that content is likely being pulled in dynamically by shortcode.<\/strong><\/p>\n<\/div>\n<h2>How to Identify Shortcode<\/h2>\n<p>Shortcodes are easy to spot \u2014 they\u2019re always wrapped in brackets [ ]. If you see content on your page like the examples below, you\u2019re looking at shortcode.<\/p>\n<ul>\n<li>[button style=\"btn-primary btn-lg\" type=\"link\" target=\"false\" title=\"Primary\" link=\"#\"]<\/li>\n<li>[unc_directory]<\/li>\n<li>[notification type=\"alert-info\" close=\"false\" ] Your content [\/notification]<\/li>\n<\/ul>\n<p>Often, <strong>the beginning of the shortcode name indicates what it does<\/strong>. For example, <strong>[button]<\/strong> shortcodes create buttons, <strong>[unc_directory]<\/strong> displays a gallery of directory profiles, and <strong>[gravityform id=\"1\"]<\/strong> adds a form. The first couple of words are a helpful clue to identify the type of shortcode being used.<\/p>\n<hr  style=\"margin:40px 0\"class=\" rule-thin osc-rule\" \/>\n<h2>Types of Shortcode<\/h2>\n<p>There are two main types of shortcode used on SOM websites, shortcode that <strong>styles content<\/strong> and shortcode that <strong>pulls in content dynamically<\/strong>.<\/p>\n<h3>Shortcode That Styles Content<\/h3>\n<p>These shortcodes are used to style or format the <strong>content that\u2019s already on the page<\/strong>. This content lives directly on the page and is simply surrounded by shortcode to give it a specific look or layout.<\/p>\n<p>Popular examples include:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/buttons\/\">Buttons<\/a><\/li>\n<li><a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/horizontal-rules\/\">Horizontal rules (hr)<\/a><\/li>\n<li><a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/notification-boxes\/\">Notification boxes<\/a><\/li>\n<li><a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/columns\/\">Columns shortcode<\/a><\/li>\n<\/ul>\n<p>These and other style related shortcodes are covered in the <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/\">Styling Content<\/a> section of the Web Guide, where you can find detailed instructions.<\/p>\n<h3>Shortcode That Pulls in Content<\/h3>\n<p>Some shortcodes don\u2019t just style content, they also <strong>pull in dynamic content from elsewhere on your site<\/strong>. These are often self-closing shortcodes that act as placeholders for content generated by a plugin or content stored in another part of the site, such as directories, forms, or Cells layouts.<\/p>\n<p>In most cases, a plugin creates and manages this dynamic content while the shortcode simply tells WordPress, \u201cdisplay that content here.\u201d<\/p>\n<h4>How Plugin Shortcodes Work<\/h4>\n<ol>\n<li>You create content within the plugin.<\/li>\n<li>The plugin generates a shortcode.<\/li>\n<li>You place that shortcode on the page where you want the content to appear.<\/li>\n<li>When the page loads, WordPress reads the shortcode and displays the content that it references.<\/li>\n<\/ol>\n<p>If you need to update what appears on the page, <strong>make those edits in the plugin where the content lives<\/strong>, not in the page that displays it. Please refer to the related shortcode documentation for instructions.<\/p>\n<h4>Examples<\/h4>\n<ul>\n<li>Directory shortcode \u2014 displays a gallery of faculty profiles. To edit profiles, go to the <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/people-directory\/\">Directory<\/a> plugin.<\/li>\n<li>Cells plugin shortcode \u2014 displays page layouts or design components. Manage the content from the <a href=\"https:\/\/www.med.unc.edu\/webguide\/cells\">Cells<\/a> plugin.<\/li>\n<li>Gravity Forms shortcode \u2014 inserts a form created in the <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/forms\/\">Gravity Forms<\/a> plugin.<\/li>\n<\/ul>\n<p>If you delete a shortcode, the displayed content disappears from the page but the source content still exists in the plugin.<\/p>\n<hr  style=\"margin:40px 0\"class=\" rule-thin osc-rule\" \/>\n<h2>Examples and Help Identifying Shortcode<\/h2>\n<p>Below are examples of the most common shortcodes used on School of Medicine websites that pull in dynamic content, along with links to their related documentation.<\/p>\n<h3>Cells<\/h3>\n<p>The Cells plugin provides a wide variety of pre-designed layouts and color options, allowing editors to quickly style and structure page content. Learn more: <a href=\"https:\/\/www.med.unc.edu\/webguide\/cells\">Cells Plugin Documentation<\/a>.<\/p>\n<ul>\n<li>The shortcode starts with &#8220;<strong>somcells<\/strong>.&#8221;<\/li>\n<li><strong>[somcells cell_id=14635]<\/strong><\/li>\n<\/ul>\n<h3>Directory<\/h3>\n<p>There are two directory plugins, each with its own shortcode, that display galleries of faculty and staff profiles. Learn more: <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/people-directory\/\">Directory Documentation<\/a>.<\/p>\n<h4>New Directory Plugin<\/h4>\n<ul>\n<li>Shortcode starts with &#8220;<strong>upd_people_directory<\/strong>.&#8221;<\/li>\n<li><strong>[upd_people_directory ...]<\/strong><\/li>\n<\/ul>\n<h4>Old Directory Plugin<\/h4>\n<ul>\n<li>Shortcode starts with &#8220;<strong>unc_directory<\/strong>.&#8221;<\/li>\n<li><strong>[unc_directory ...]<\/strong><\/li>\n<\/ul>\n<h3>Toolset<\/h3>\n<p>Toolset is an advanced plugin used for custom and dynamic content that typically requires assistance from the SOM Web Team. It has a few different types of shortcode &#8211; mainly views and content templates.\u00a0This shortcode likely represents a custom element created by the Web Team. There is no documentation for these shortcodes because each instance is unique. <a href=\"https:\/\/www.med.unc.edu\/webguide\/getting-help\/website-help-request\/\">Contact the Web Team<\/a> if you need help understanding or managing the dynamic content being displayed.<\/p>\n<ul>\n<li>Content templates have a shortcode prefix of <strong>[wpv-post-body&#8230; ]<\/strong><\/li>\n<li>Views have a shortcode prefix of <strong>[wpv-view&#8230; ]<\/strong><\/li>\n<\/ul>\n<h3>TablePress<\/h3>\n<p>Displays tables created with the TablePress plugin. Learn more: <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/styling-content\/tables\/tablepress-plugin\/\">TablePress Documentation<\/a>.<\/p>\n<ul>\n<li>The shortcode starts with &#8220;<strong>table<\/strong>.&#8221;<\/li>\n<li><strong>[table id=2 \/]<\/strong><\/li>\n<\/ul>\n<h3>Forms<\/h3>\n<p>Embeds forms created with the Gravity Forms plugin. Learn more: <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/forms\/\">Forms Documentation<\/a>.<\/p>\n<ul>\n<li>The shortcode starts with &#8220;<strong>gravityform<\/strong>.&#8221;<\/li>\n<li><strong>[gravityform id=\"2\" title=\"false\" description=\"false\"]<\/strong><\/li>\n<\/ul>\n<h3>News and Events<\/h3>\n<p>Shortcode created by UNC ITS offers 3 different display options for both news and events. The naming convention isn&#8217;t consistent so these are a little harder to identify. Note that <a href=\"https:\/\/www.med.unc.edu\/webguide\/cells\/syndication\/\">the Cells plugin can also be used to display news and events<\/a>. Learn more: <a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/news-events\/\">News and Events Documentation<\/a>.<\/p>\n<h4>News Posts<\/h4>\n<ul>\n<li>These shortcodes have &#8220;<strong>posts<\/strong>&#8221; or &#8220;<strong>heels_posts<\/strong>&#8221; at the beginning of the shortcode.<\/li>\n<li><strong>[heels_posts posts=\"4\" htag=\"h2\"]<\/strong><\/li>\n<li><strong>[heels_list_posts posts=\"4\" htag=\"h2\"]<\/strong><\/li>\n<li><strong>[iso_posts posts=\"20\" htag=\"h2\"]<\/strong><\/li>\n<\/ul>\n<h4>Events<\/h4>\n<ul>\n<li>Two of the tree options start with &#8220;<strong>heels-tribe<\/strong>.&#8221;<\/li>\n<li><strong>[heels-tribe-events number=\"4\"]<\/strong><\/li>\n<li><strong>[heels-tribe-list number=\"4\"]<\/strong><\/li>\n<li><strong>[iso_posts posts=\"20\" htag=\"h2\"]<\/strong><\/li>\n<\/ul>\n<h3>Widgets On Pages<\/h3>\n<p><a href=\"https:\/\/www.med.unc.edu\/webguide\/userguide\/widgets\">Widgets<\/a> are modular content blocks that can display items such as menus, news feeds, events, or other reusable components.\u00a0Although widgets are typically placed in designated widget areas (like sidebars or footers), some SOM sites may use a plugin that insert widget content into the body content area.<\/p>\n<ul>\n<li><strong>[widgets_on_pages id=&#8221;&#8221;]<\/strong><\/li>\n<li><strong>[do_widget id=\"\"]<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortcode is a small piece of code enclosed in square brackets that displays dynamic content or styles content without requiring any HTML. Shortcodes are widely used across School of Medicine (SOM) websites to add content such as forms, tables, directories, buttons, and stylized content. They make it easy to add complex or styled features while &hellip; <a href=\"https:\/\/www.med.unc.edu\/webguide\/2019\/11\/machu-pichu-peru\/\" aria-label=\"Read more about Machu Pichu, Peru with an Extra Long Title for Example Purposes\">Read more<\/a><\/p>\n","protected":false},"author":3206,"featured_media":0,"parent":2212,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"layout":"","cellInformation":"","apiCallInformation":"","footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-14872","page","type-page","status-publish","hentry","odd"],"acf":[],"_links_to":[],"_links_to_target":[],"_links":{"self":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/14872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/users\/3206"}],"replies":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/comments?post=14872"}],"version-history":[{"count":32,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/14872\/revisions"}],"predecessor-version":[{"id":15653,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/14872\/revisions\/15653"}],"up":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/pages\/2212"}],"wp:attachment":[{"href":"https:\/\/www.med.unc.edu\/webguide\/wp-json\/wp\/v2\/media?parent=14872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}