{"id":967,"date":"2022-09-12T18:33:12","date_gmt":"2022-09-12T18:33:12","guid":{"rendered":"https:\/\/glossary.dream.press\/glossary\/%group%\/shortcode\/"},"modified":"2025-05-07T22:53:48","modified_gmt":"2025-05-07T22:53:48","slug":"shortcode","status":"publish","type":"glossary","link":"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/","title":{"rendered":"Shortcode"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/wordpress\/\">WordPress<\/a> has a variety of built-in shortcodes for creating and adding different elements, such as images, slideshows, contact forms, and more. Some <a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/plugin\/\">WordPress plugins<\/a> also use shortcodes.<\/p>\n\n\n\n<p>To add a shortcode to a <a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/post\/\">post<\/a> or <a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/page-post-type\/\">page<\/a>, click on the Add Block button, and insert the Shortcode block. Then, simply add your code to the block.<\/p>\n\n\n\n<p>Shortcodes are written between square brackets [example]. For example, if you want to add a gallery, you can type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gallery ids=\u201d1, 2, 3, 4, 5, 6\u201d columns=\u201d3\u201d size=large<\/pre>\n\n\n\n<p>This shortcode will create a gallery of your first six images in three columns with large as the maximum size.<\/p>\n","protected":false},"featured_media":0,"parent":0,"menu_order":0,"template":"","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress."},"group":[18],"class_list":["post-967","glossary","type-glossary","status-publish","hentry","group-wordpress"],"acf":{"cta":"Managed WP Hosting","term_definition":"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.","h2_more":"More About Shortcodes","title_tag":"What is a Shortcode?"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is a Shortcode? - DreamHost Glossary<\/title>\n<meta name=\"description\" content=\"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is a Shortcode? - DreamHost Glossary\" \/>\n<meta property=\"og:description\" content=\"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/shortcode\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Glossary\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-07T22:53:48+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<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is a Shortcode? - DreamHost Glossary","description":"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.","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:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/","og_locale":"en_US","og_type":"article","og_title":"What is a Shortcode? - DreamHost Glossary","og_description":"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.","og_url":"https:\/\/www.dreamhost.com\/glossary\/wordpress\/shortcode\/","og_site_name":"DreamHost Glossary","article_modified_time":"2025-05-07T22:53:48+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/","url":"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/","name":"What is a Shortcode? - DreamHost Glossary","isPartOf":{"@id":"https:\/\/glossary.dream.press\/glossary\/#website"},"datePublished":"2022-09-12T18:33:12+00:00","dateModified":"2025-05-07T22:53:48+00:00","description":"A shortcode is a piece of code that simplifies actions for web developers. It is essentially a shortcut for coding. Shortcodes execute code in WordPress.","breadcrumb":{"@id":"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/glossary.dream.press\/glossary\/wordpress\/shortcode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dreamhost.com\/glossary\/"},{"@type":"ListItem","position":2,"name":"Terms","item":"https:\/\/www.dreamhost.com\/glossary\/%group%\/"},{"@type":"ListItem","position":3,"name":"Shortcode"}]},{"@type":"WebSite","@id":"https:\/\/glossary.dream.press\/glossary\/#website","url":"https:\/\/glossary.dream.press\/glossary\/","name":"DreamHost Glossary","description":"","publisher":{"@id":"https:\/\/glossary.dream.press\/glossary\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/glossary.dream.press\/glossary\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/glossary.dream.press\/glossary\/#organization","name":"DreamHost","url":"https:\/\/glossary.dream.press\/glossary\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/glossary.dream.press\/glossary\/#\/schema\/logo\/image\/","url":"https:\/\/glossary.dream.press\/glossary\/wp-content\/uploads\/2022\/10\/dreamhost-glossary-social.jpg","contentUrl":"https:\/\/glossary.dream.press\/glossary\/wp-content\/uploads\/2022\/10\/dreamhost-glossary-social.jpg","width":2400,"height":1256,"caption":"DreamHost"},"image":{"@id":"https:\/\/glossary.dream.press\/glossary\/#\/schema\/logo\/image\/"}}]}},"lang":"en","translations":{"en":967,"es":1697,"fr":7683,"nl":7714,"it":8685,"pt":9775,"de":9790,"pl":9805,"uk":9937,"ru":9947},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/glossary.dream.press\/glossary\/wp-json\/wp\/v2\/glossary\/967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glossary.dream.press\/glossary\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/glossary.dream.press\/glossary\/wp-json\/wp\/v2\/types\/glossary"}],"wp:attachment":[{"href":"https:\/\/glossary.dream.press\/glossary\/wp-json\/wp\/v2\/media?parent=967"}],"wp:term":[{"taxonomy":"group","embeddable":true,"href":"https:\/\/glossary.dream.press\/glossary\/wp-json\/wp\/v2\/group?post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}