{"id":460,"date":"2022-01-21T15:50:58","date_gmt":"2022-01-21T14:50:58","guid":{"rendered":"https:\/\/www.molongui.com\/help\/?p=460"},"modified":"2022-01-22T09:48:51","modified_gmt":"2022-01-22T08:48:51","slug":"what-is-a-shortcode","status":"publish","type":"post","link":"https:\/\/www.molongui.com\/help\/what-is-a-shortcode\/","title":{"rendered":"What is a Shortcode"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"460\" class=\"elementor elementor-460\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1c779da9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1c779da9\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3167897d\" data-id=\"3167897d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-329fa6a2 elementor-widget elementor-widget-text-editor\" data-id=\"329fa6a2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-39bfa66 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"39bfa66\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5b46115\" data-id=\"5b46115\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bf883ce elementor-widget elementor-widget-text-editor\" data-id=\"bf883ce\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you&#8217;ve been using WordPress for a little bit, you might have come across the term &#8220;shortcode&#8221;. While shortcodes are an exceptionally helpful feature in WordPress, the name isn&#8217;t very self-explanatory (at least at first). That might have you wondering\u2026 What is a shortcode in WordPress?<\/p>\n<p>In a nutshell, <strong>a shortcode is a small piece of code that allow you to do various things with little effort<\/strong>.<\/p>\n<p>They allow you to execute code inside WordPress posts, pages, and widgets without writing any code directly. This allows you to add a specific feature to your content. For example, a shortcode for displaying an author box by the <a href=\"https:\/\/www.molongui.com\/authorship\/\">Molongui Authorship<\/a> plugin might look like this:<\/p>\n<p><code>[author_box]<\/code><\/p>\n<p>They can also come with attributes. For example, the author box shortcode mentioned above can take a show_avatar attribute:<\/p>\n<p><code>[author_box show_avatar=no]<\/code><\/p>\n<p>So, shortcodes simplify the addition of features to your WordPress site. Galleries, videos, and various other functionality would require a lot of code editing. By using shortcodes the HTML and other markup is added dynamically directly into the post or page where the user wants them to appear.<\/p>\n<p>Shortcodes can be simply copied and pasted directly onto your site. Generally, they&#8217;re placed into a post or page. However, they can go in any location where you can add code through the WordPress editor, such as a custom post type or a text widget.<\/p>\n<p>WordPress comes with several that are built in. These include audio, caption, embed, gallery, and video. Others are added by plugins. Molongui plugins provide several shortcodes for your convenience. Make sure to check out the <a href=\"https:\/\/www.molongui.com\/help\/\">plugin documentation<\/a> to get to know how to use them.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9548142 elementor-widget elementor-widget-heading\" data-id=\"9548142\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Is There Anything Bad About Using Shortcodes?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-78789d9 elementor-widget elementor-widget-text-editor\" data-id=\"78789d9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Nope! There&#8217;s nothing wrong with using shortcodes. There is one thing you should remember, though: If you use shortcodes that come bundled with a plugin, those shortcodes will stop working if you ever disable that plugin.<\/p>\n<p>This isn&#8217;t a &#8220;bad&#8221; thing \u2013 it&#8217;s just something you should be aware of so that you don&#8217;t get surprised down the road!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d618cb4 elementor-widget elementor-widget-heading\" data-id=\"d618cb4\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Hiding Unused Shortcodes<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-deec0a7 elementor-widget elementor-widget-text-editor\" data-id=\"deec0a7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you are using a plugin that utilizes shortcodes and you delete and or remove that plugin, your site could look really weird until you replace them. If you want to temporarily disable the shortcodes from the old plugin, simply use the following code in your <code>functions.php<\/code> file; updating <code>plugin_shortcode_tag<\/code> with the plugin&#8217;s actual shortcode tag.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8829318 elementor-widget elementor-widget-code-highlight\" data-id=\"8829318\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>add_shortcode( 'plugin_shortcode_tag', '__return_false' );<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5602804 elementor-widget elementor-widget-text-editor\" data-id=\"5602804\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This will disable them from showing altogether. But remember, if you want to use them with the original plugin again, you would need to remove the code. However, it can be a quick way to clean up your site while you replace the shortcodes with perhaps a newer plugin&#8217;s shortcode format.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2bc9e03 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2bc9e03\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4b14bd4\" data-id=\"4b14bd4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fba5973 elementor-widget elementor-widget-heading\" data-id=\"fba5973\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Related Articles<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-042acb2 elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list\" data-id=\"042acb2\" data-element_type=\"widget\" data-widget_type=\"icon-list.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul class=\"elementor-icon-list-items\">\n\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.molongui.com\/help\/molongui-authorship-available-shortcodes\/\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t<i aria-hidden=\"true\" class=\"far fa-file-alt\"><\/i>\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">Molongui Authorship Available Shortcodes<\/span>\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t<li class=\"elementor-icon-list-item\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.molongui.com\/help\/molongui-deals-available-shortcodes\/\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-icon\">\n\t\t\t\t\t\t\t<i aria-hidden=\"true\" class=\"far fa-file-alt\"><\/i>\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text\">Molongui Deals Available Shortcodes<\/span>\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been using WordPress for a little bit, you might have come across the term &#8220;shortcode&#8221;. While shortcodes are an exceptionally helpful feature in WordPress, the name isn&#8217;t very self-explanatory (at least at first). That might have you wondering\u2026 What is a shortcode in WordPress? In a nutshell, a shortcode is a small piece [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8,19],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-doc","tag-common","tag-shortcodes"],"_links":{"self":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":10,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/460\/revisions\/1140"}],"wp:attachment":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}