{"id":19144,"date":"2014-01-23T18:01:06","date_gmt":"2014-01-23T10:01:06","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=19144"},"modified":"2025-04-04T01:41:54","modified_gmt":"2025-04-03T17:41:54","slug":"wordpress-shortcodes-plugins","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/","title":{"rendered":"20 WordPress Shortcodes and Plugins You Might Want To Try"},"content":{"rendered":"<p>If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won\u2019t have to fill your posts and pages with long ugly codes, they be condensed into <strong>just one line of code \u2013 a shortcode.<\/strong><\/p>\n<p>In a nutshell, <strong>a shortcode is basically a shortcut <\/strong>to a long script or piece of code. Even though WordPress has its own set of <a rel=\"nofollow\" href=\"https:\/\/wordpress.com\/support\/shortcodes\/\">shortcodes<\/a> that you can use within your blog\u2019s posts and pages, there are a whole lot more shortcodes available out there, with a ton more flexibility to offer.<\/p>\n<p>Shortcodes can be <strong>inserted manually into your blog theme <\/strong>or via<strong> a plugin<\/strong>. The problem is finding one that suits what you want to do on your blog. Fret not, in this post, we\u2019ll showcase <strong>10 WordPress plugins that add shortcode functionality to your blog, along with 10 codes<\/strong> that you can add yourself.<\/p>\n<div class=\"ref-block ref-block--post\" id=\"ref-post-1\">\n\t\t\t\t\t<a href=\"https:\/\/www.hongkiat.com\/blog\/essential-wordpress-plugins\/\" class=\"ref-block__link\" title=\"Read More: 50 Useful WordPress Plugins You Should Know\" rel=\"bookmark\"><span class=\"screen-reader-text\">50 Useful WordPress Plugins You Should Know<\/span><\/a>\n<div class=\"ref-block__thumbnail img-thumb img-thumb--jumbo\" data-img='{ \"src\" : \"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/essential-wordpress-plugins.jpg\" }'>\n\t\t\t\t\t\t\t<noscript>\n<style>.no-js #ref-block-post-13437 .ref-block__thumbnail { background-image: url(\"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/essential-wordpress-plugins.jpg\"); }<\/style>\n<\/noscript>\n\t\t\t\t\t\t<\/div>\n<div class=\"ref-block__summary\">\n<h4 class=\"ref-title\">50 Useful WordPress Plugins You Should Know<\/h4>\n<p class=\"ref-description\">\n\t\t\t\t\t\tNowadays, just about everyone can consider themselves a blogger. The tools and plugins made available online are making...\t\t\t\t\t\t<span>Read more<\/span><\/p>\n<\/div>\n<\/div>\n<h2>WordPress Plugins<\/h2>\n<p>Here are some plugins that allow you to use or custom-build shortcodes for use on WordPress. Where relevant, an alternative plugin that does pretty much the same thing is suggested after each plugin.<\/p>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/shortcode\/\">Shortcode<\/a><\/h3>\n<p>A simple plugin that adds <a rel=\"nofollow\" href=\"https:\/\/www.maxpagels.com\/shortcodes.txt\">several useful shortcodes<\/a> for you to  show off your blog\u2019s contents quantitatively. A few of the codes include:<\/p>\n<ul>\n<li><code>[postcountbr]<\/code> \u2013 displays total number of published blog posts<\/li>\n<li><code>[catcountbr]<\/code> \u2013 displays total number of categories that contain one or more posts<\/li>\n<li><code>[tagcountbr]<\/code> \u2013 displays total number of tags that contain one or more posts<\/li>\n<li><code>[totalwords]<\/code> \u2013 displays total number of words in published posts<\/li>\n<li><code>[commentcount]<\/code> \u2013 displays the total number of approved comments<\/li>\n<li><code>[pagecount]<\/code> \u2013 displays the total number of published pages<\/li>\n<\/ul>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/synved-shortcodes\/\">WordPress Shortcodes<\/a><\/h3>\n<p>This plugin includes <strong>more than 20 WordPress shortcodes<\/strong> and an easy-to-use <strong>shortcode editor<\/strong>. You can use it to add cool elements like:<\/p>\n<ul>\n<li>SEO-ready tabs, buttons<\/li>\n<li>author cards<\/li>\n<li>message boxes<\/li>\n<li>smart links<\/li>\n<li>sections<\/li>\n<li>lists, etc to your blog.<\/li>\n<\/ul>\n<p>You can even <strong>combine multiple nested shortcodes<\/strong> to create unique elements like a list of buttons or links.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg\" alt=\"WordPress Shortcodes Plugin\" height=\"379\" width=\"500\"><\/figure>\n<p><strong>More: <\/strong>Two similar plugins are <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/j-shortcodes\/screenshots\/\"><strong>J Shortcodes<\/strong><\/a> and<strong> <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/arconix-shortcodes\/\">Arconix Shortcodes<\/a> <\/strong>\u2013 which also have a collection of useful shortcodes for  use, e.g. to create content and information boxes, buttons, tabs, accordion panels, toggles and more.<\/p>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/post-content-shortcodes\/\">Post Content Shortcodes<\/a><\/h3>\n<p>This plugin adds two shortcodes:<\/p>\n<p><code>[post-content]<\/code> \u2013 lets you <strong>display the content of a single post or page, within another post or page<\/strong>. You must use an argument within the shortcode to specify the post ID. You can also use arguments to display a featured image, post excerpt, and post title.<\/p>\n<p><code>[post-list]<\/code> \u2013 <strong>displays a list of posts within another post<\/strong>. It also supports optional arguments for customizing the list such as order options, post types\/statuses to use, display images, excerpts, etc. You can even pull a list of posts from another blog, by adding the blog\u2019s ID as an argument in the shortcode.<\/p>\n<p><strong>More: <\/strong>If want to display a list of attachments within a post, check out the <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/list-attachments-shortcode\/\">List Attachments Shortcode<\/a> plugin (by the same developer).<\/p>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/shortcoder\/\">Shortcoder<\/a><\/h3>\n<p>Shortcoder lets you <strong>create custom shortcodes<\/strong> via a visual editor. You can also store frequently used text, HTML, and JavaScript snippets. It has a tinyMCE button that you can use from the blog editor to insert shortcodes, thereby allowing you to add your own custom shortcodes.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/shortcoder.jpg\" alt=\"Shortcoder WordPress Plugin\" height=\"401\" width=\"500\"><\/figure>\n<p><strong>More:<\/strong> If you\u2019re looking for something similar, try out <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/shortbus\/\">Shortcode Manager<\/a>, which lets you create, manage,  import and export shortcodes.<\/p>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/hide-broken-shortcodes\/\">Hide Broken Shortcodes<\/a><\/h3>\n<p>Sometimes, you may have accidentally disabled shortcodes, leaving their functionality somewhat disrupted. Rather than go through each page or post to remove these \"broken\" shortcodes, an easier way is just to hide them. This plugin will help you do that.<\/p>\n<p><strong>More<\/strong>: <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/hide-unwanted-shortcodes\/\">Hide Unwanted Shortcodes<\/a> is a similar plugin that works to prevent broken shortcodes from showing up on the site. You can then edit the shortcode from the plugin\u2019s settings page.<\/p>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/column-shortcodes\/\">Column Shortcodes<\/a><\/h3>\n<p>If you\u2019re looking for an <strong>easy way to create columns<\/strong> within your posts and pages, this is the perfect shortcode plugin. Just choose your desired column width from the shortcode selector pop up, and it will be added to the post editor. There are 10 column widths to choose from full width down to one sixth. You can also customize the padding of each individual column.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/column-shortcodes.jpg\" alt=\"Column Shortcodes WordPress Plugin\" height=\"649\" width=\"500\"><\/figure>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/mtphr-shortcodes\/\">Metaphor Shortcodes<\/a><\/h3>\n<p>If you\u2019re looking for a <strong>responsive column grid<\/strong> for your posts and pages, try out the Metaphor Shortcodes plugin. You can set certain attributes for your columns such as span, start, end, and class. This plugin also comes with a few other handy shortcodes, including:<\/p>\n<ul>\n<li><strong>Post Block Shortcode<\/strong> \u2013 display the title and excerpt of any post type, anywhere on your blog<\/li>\n<li><strong>Post Slider Shortcode<\/strong> \u2013 create a horizontal slider of any post type and display within your content<\/li>\n<li><strong>Pricing Table Shortcode<\/strong> \u2013 create various types of pricing tables to display within your content<\/li>\n<\/ul>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/shortcodes-ui\/\">ShortCodes UI<\/a><\/h3>\n<p>ShortCodes UI is another plugin for creating shortcodes that come with its own tinyMCE and Quicktag buttons. You can <strong>easily insert shortcodes<\/strong> in your posts and pages from both the visual and HTML editors.<\/p>\n<p>It is great for beginners who know little about code, and there are video tutorials to help. For those who know a little more about code, they would probably appreciate the <strong>syntax highlighting code editor<\/strong>. There is also  an import\/export feature so you can move your shortcodes from one site to another and even share with friends.<\/p>\n<p><strong>More: <\/strong><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/my-shortcodes\/\">My Shortcodes<\/a> is a similar plugin with a beautiful UI that lets you create custom shortcodes. Within the plugin\u2019s admin panel, you can manage, edit, activate\/deactivate, and export elements and shortcodes. The live preview lets you see how your shortcode looks without adding it to a post or page.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/shortcodes-ui.jpg\" alt=\"ShortCodes UI WordPress Plugin\" height=\"500\" width=\"500\"><\/figure>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/last-updated-shortcode\/\">Last Updated Shortcode<\/a><\/h3>\n<p>This is a very simple plugin that <strong>lets you add the <code>[lastupdated]<\/code> shortcode<\/strong> to your posts and pages. It will then display the date and\/or time of the last update. There are also options to change how the date\/time is formatted.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/last-updated-shortcode.jpg\" alt=\"Last Updated Shortcode WordPress Plugin\" height=\"102\" width=\"500\"><\/figure>\n<h3><a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/geoportail-shortcode\/\">Geoportail Shortcode<\/a><\/h3>\n<p>This one <strong>adds a Geoportail map<\/strong> into your posts and pages with a shortcode. You can then set the map size, zoom level, location (latitude and longitude), size (normal, mini), territory, layers and more. The map supports geotagging (which you can enable with this plugin <a rel=\"nofollow\" href=\"https:\/\/wordpress.org\/plugins\/geolocation\/\">Geolocation<\/a>), so the location of your posts will be reflected.<\/p>\n<p>The plugin also includes a <strong>shortcode builder<\/strong>, for custom map shortcodes, and a live preview, so that you can see your map before posting it.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/geoportail-shortcode.jpg\" alt=\"Geoportail Shortcode WordPress Plugin\" height=\"500\" width=\"500\"><\/figure>\n<h2>Shortcodes<\/h2>\n<p>These are fun and simple shortcodes that you can use on your blog \u2013 <strong>no plugin necessary<\/strong>. For each shortcode we will provide you with:<\/p>\n<ul>\n<li><strong>The meat of the shortcode<\/strong> \u2013 a long piece of code that must be pasted into the Theme functions file (functions.php) for your blog, from the Editor in the WordPress dashboard (<strong>Appearance &gt; Editor<\/strong>).<\/li>\n<li><strong>The shortcode<\/strong>, which can be placed anywhere within your posts and pages, to add functionality.<\/li>\n<\/ul>\n<p>Some of these <strong>may need a little customization<\/strong> (i.e. adding your own Google AdSense code), so you\u2019ll need to know a thing or two about editing codes. Others may have <strong>optional parameters<\/strong> that you can add, like width and height. You can find out more by clicking on the link for each shortcode.<\/p>\n<h3>Insert AdSense Ads<\/h3>\n<p>Insert AdSense ads within your content, wherever you\u2019d like.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [adsense]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction adsense_shortcode( $atts ) {\r\n\t\textract(shortcode_atts(array(\r\n        \t'format' =&gt; '1',\r\n        ), $atts));\r\n        \r\n        switch ($format) {\r\n        \t\tcase 1 :\r\n               \t\t$ad = '&lt;script type=\"text\/javascript\"&gt;&lt;!-- \r\n        \t\t\t\tgoogle_ad_client = \"pub-6928386133078955\";\r\n\t\t\t\t\t\t\/* 234x60, created 16\/09\/08 *\/\r\n\t\t\t\t\t\tgoogle_ad_slot = \"0834408702\";\r\n\t\t\t\t\t\tgoogle_ad_width = 234;\r\n\t\t\t\t\t\tgoogle_ad_height = 60;\r\n\t\t\t\t\t\t\/\/--&gt;\r\n\t\t\t\t\t\t&lt;\/script&gt;\r\n\t\t\t\t\t\t&lt;script type=\"text\/javascript\"\r\n\t\t\t\t\t\tsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"&gt;\r\n\t\t\t\t\t\t&lt;\/script&gt;';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $ad;\r\n}\r\nadd_shortcode('adsense', 'adsense_shortcode');<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/wordpress-shortcode-to-display-related-posts\">Show Related Posts<\/a><\/h3>\n<p>Show related posts above or below your content.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [related_posts]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction related_posts_shortcode( $atts ) {\r\n\t\textract(shortcode_atts(array(\r\n\t    'limit' =&gt; '5',\r\n\t), $atts));\r\n    \r\n    global $wpdb, $post, $table_prefix;\r\n    \r\n    if ($post-&gt;ID) {\r\n\t\t\t$retval = '&lt;ul&gt;';\r\n\t\t\t\/\/ Get tags\r\n\t\t\t$tags = wp_get_post_tags($post-&gt;ID);\r\n\t\t\t$tagsarray = array();\r\n\t\t\tforeach ($tags as $tag) {\r\n\t\t\t\t\t$tagsarray[] = $tag-&gt;term_id;\r\n\t\t\t}\r\n\t\t\t$tagslist = implode(',', $tagsarray);\r\n\t\t\t\r\n\t\t\t\/\/ Do the query\r\n\t\t\t$q = \"SELECT p.*, count(tr.object_id) as count\r\n\t\t\t\t\tFROM $wpdb-&gt;term_taxonomy AS tt, $wpdb-&gt;term_relationships AS tr, $wpdb-&gt;posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id  = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post-&gt;ID\r\n\t\t\t\t\t\t\t\tAND p.post_status = 'publish'\r\n\t\t\t\t\t\t\t\tAND p.post_date_gmt &lt; NOW()\r\n\t\t\t\t\tGROUP BY tr.object_id\r\n\t\t\t\t\tORDER BY count DESC, p.post_date_gmt DESC\r\n\t\t\t\t\tLIMIT $limit;\";\r\n\r\n\t\t\t$related = $wpdb-&gt;get_results($q);\r\n\t\t\tif ( $related ) {\r\n\t\t\t\t\tforeach($related as $r) {\r\n\t\t\t\t\t\t\t$retval .= '\r\n\t&lt;li&gt;&lt;a title=\"'.wptexturize($r-&gt;post_title).'\" href=\"'.get_permalink($r-&gt;ID).'\"&gt;'.wptexturize($r-&gt;post_title).'&lt;\/a&gt;&lt;\/li&gt;\r\n';\r\n\t\t\t} else {\r\n\t\t\t\t\t$retval .= '\r\n\t&lt;li&gt;No related posts found&lt;\/li&gt;\r\n';\r\n\t\t\t}\r\n\t\t\t$retval .= '&lt;\/ul&gt;\r\n';\r\n\t\t\treturn $retval;\r\n\t}\r\n\treturn;\r\n}\r\nadd_shortcode('related_posts', 'related_posts_shortcode');\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"https:\/\/www.isitwp.com\/paypal-donation-shortcode-2\/\">Insert PayPal Donation Link<\/a><\/h3>\n<p>Add a PayPal button, making it easy for readers and visitors to donate.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [donate]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction donate_shortcode( $atts, $content = null) {\r\n\tglobal $post;extract(shortcode_atts(array(\r\n\t\t'account' &gt; 'your-paypal-email-address',\r\n\t\t'for' =&gt; $post-&gt;post_title,\r\n\t\t'onHover' =&gt; '',\r\n\t), $atts));\r\n\tif(empty($content)) $content='Make A Donation';\r\n\t\t\treturn '&lt;a href=\"https:\/\/www.paypal.com\/cgi-bin\/webscr?\r\n$account.'&item_name=Donation for '.$for.'\" title=\"'.$onHover.'\"&gt;'.$content.'&lt;\/a&gt;';\r\n}\r\nadd_shortcode('donate', 'donate_shortcode');\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/wordpress-shortcode-to-easily-integrate-a-google-map-on-your-blog\">Display A Google Map<\/a><\/h3>\n<p>Add a Google Map of any location to your posts.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [googlemap src=\"google_map_url\"]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction rockable_googlemap($atts, $content = null) {\r\n   extract(shortcode_atts(array(\r\n               \"width\" =&gt; '940',\r\n               \"height\" =&gt; '300',\r\n               \"src\" =&gt; ''\r\n   ), $atts));\r\n\r\nreturn '&lt;div&gt;\r\n\t\t\t&lt;iframe src=\"'.$src.'&output=embed\" frameborder=\"0\" marginwidth=\"0\" \r\nmarginheight=\"0\" scrolling=\"no\" width=\"'.$width.'\" height=\"'.$height.'\"&gt;&lt;\/iframe&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t';\r\n}\r\n\r\nadd_shortcode(\"googlemap\", \"rockable_googlemap\");\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/shortcode-to-display-external-files-on-your-posts\">Display External Files<\/a><\/h3>\n<p>Add external files like text and images into your posts.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [show_file file=\"http:\/\/www.test.com\/test.html\"]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction show_file_func( $atts ) {\r\n  extract( shortcode_atts( array(\r\n    'file' =&gt; ''\r\n  ), $atts ) );\r\n\r\n  if ($file!='')\r\n    return @file_get_contents($file);\r\n}\r\n\r\nadd_shortcode( 'show_file', 'show_file_func' );\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/how-to-create-a-login-form-shortcode-for-your-wordpress-blog\">Add A Login Form<\/a><\/h3>\n<p>Add a login form to your posts and pages, not just the sidebar.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [devpress-login-form]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction devpress_login_form_shortcode() {\r\n\tif ( is_user_logged_in() )\r\n\t\treturn '';\r\n\r\n\treturn wp_login_form( array( 'echo' =&gt; true ) );\r\n}\r\n\r\nfunction devpress_add_shortcodes() {\r\n\tadd_shortcode( 'devpress-login-form', 'devpress_login_form_shortcode' );\r\n}\r\n\r\nadd_action( 'init', 'devpress_add_shortcodes' );\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/add-private-notes-to-your-wordpress-blog-posts\">Display Private Notes<\/a><\/h3>\n<p>Add a private note to your post or page that will only be visible to admins.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [note]Your Note Here[\/note]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nadd_shortcode( 'note', 'sc_note' );\r\n\r\nfunction sc_note( $atts, $content = null ) {\r\n\t \tif ( current_user_can( 'publish_posts' ) )\r\n\t\t\t\treturn '&lt;div class=\"note\"&gt;'.$content.'&lt;\/div&gt;';\r\n\t\treturn '';\r\n}\r\n\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"http:\/\/www.wprecipes.com\/wordpress-shortcode-display-content-to-registered-users-only\">Registered Users Only Content<\/a><\/h3>\n<p>Add content that only registered users of your blog can see.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [member]For Registered Users Only[\/member]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nadd_shortcode( 'member', 'member_check_shortcode' );\r\n\r\nfunction member_check_shortcode( $atts, $content = null ) {\r\n\t\tif ( is_user_logged_in() && !is_null( $content ) && !is_feed() )\r\n\t\t\t\treturn $content;\r\n\t\treturn '';\r\n}\r\n<\/pre>\n<h3><a rel=\"nofollow\" href=\"https:\/\/code.tutsplus.com\/articles\/getting-started-with-wordpress-shortcodes--wp-21197\">Embed YouTube Videos<\/a><\/h3>\n<p>Not only can this embed YouTube videos, but it can also be used for other media like audio and images.<\/p>\n<p><strong>Shortcode<\/strong>: <code>[youtube id=\"_ggWarwhv9M\"]Check out this video![\/youtube]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction wptuts_youtube($atts, $content=null){  \r\n\r\n    extract(shortcode_atts( array('id' =&gt; ''), $atts));  \r\n\r\n    $return = $content;  \r\n    if($content)\r\n\t\t$return .= \"&lt;br \/&gt;&lt;br \/&gt;\"; \r\n\r\n\t $return .= '&lt;iframe width=\"560\" height=\"349\" src=\"https:\/\/www.youtube.com\/embed\/' . $id . '\" frameborder=\"0\" allowfullscreen&gt;&lt;\/iframe&gt;'; \r\n\r\n\t return $return;\r\n}  \r\nadd_shortcode('youtube', 'wptuts_youtube');<\/pre>\n<h3><a rel=\"nofollow\" href=\"https:\/\/andrewnorcross.com\/tutorials\/obfuscate-email-addresses-with-a-shortcode\/\">Obfuscate Email Address<\/a><\/h3>\n<p>Keep your email safe from spammers by rendering it unclear when scraped from a page.<\/p>\n<p><strong>Shortcode<\/strong>: <code> [email address=\"you@email.com\"]<\/code><\/p>\n<p><strong>Code<\/strong>:<\/p>\n<pre>\r\nfunction emailbot_ssc($attr) {\r\n    extract( shortcode_atts( array(\r\n        'address' =&gt; '',\r\n    ), $attr ) );\r\n\r\n\t $email = '&lt;a class=\"email_link\" href=\"mailto:'.antispambot($attr['address']).'\" title=\"Send Us An Email\" target=\"_blank\"&gt;';\r\n\t $email .= antispambot($attr['address']);\r\n\t $email .= '&lt;\/a&gt;';\r\n\r\n\t return $email;\r\n}\r\nadd_shortcode('email', 'emailbot_ssc');<\/pre>","protected":false},"excerpt":{"rendered":"<p>If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won\u2019t have to fill your posts and pages with long ugly codes, they be condensed into just one line of code \u2013 a shortcode. In a nutshell, a shortcode is&hellip;<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49],"tags":[4663,3323,252],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>20 WordPress Shortcodes and Plugins You Might Want To Try - Hongkiat<\/title>\n<meta name=\"description\" content=\"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won&#039;t\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"20 WordPress Shortcodes and Plugins You Might Want To Try\" \/>\n<meta property=\"og:description\" content=\"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won&#039;t\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-23T10:01:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:41:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg\" \/>\n<meta name=\"author\" content=\"Charnita Fance\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Charnita Fance\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/\"},\"author\":{\"name\":\"Charnita Fance\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/5d79508239e373fbbb7fd708976d7bd1\"},\"headline\":\"20 WordPress Shortcodes and Plugins You Might Want To Try\",\"datePublished\":\"2014-01-23T10:01:06+00:00\",\"dateModified\":\"2025-04-03T17:41:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/\"},\"wordCount\":1404,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-shortcodes-plugins\\\/wordpress-shortcodes.jpg\",\"keywords\":[\"ad-divi\",\"WordPress Plugins\",\"WordPress Tips\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/\",\"name\":\"20 WordPress Shortcodes and Plugins You Might Want To Try - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-shortcodes-plugins\\\/wordpress-shortcodes.jpg\",\"datePublished\":\"2014-01-23T10:01:06+00:00\",\"dateModified\":\"2025-04-03T17:41:54+00:00\",\"description\":\"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won't\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-shortcodes-plugins\\\/wordpress-shortcodes.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-shortcodes-plugins\\\/wordpress-shortcodes.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-shortcodes-plugins\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"20 WordPress Shortcodes and Plugins You Might Want To Try\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/5d79508239e373fbbb7fd708976d7bd1\",\"name\":\"Charnita Fance\",\"description\":\"Charnita is an Internet Marketing student at Full Sail University. She is also a part-time blogger. In her spare time she enjoys trying out new apps for the Web, PC, Mac and iPhone. You can find her latest blog posts at SocialWebTools.info.\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/charnita\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"20 WordPress Shortcodes and Plugins You Might Want To Try - Hongkiat","description":"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won't","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:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/","og_locale":"en_US","og_type":"article","og_title":"20 WordPress Shortcodes and Plugins You Might Want To Try","og_description":"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won't","og_url":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2014-01-23T10:01:06+00:00","article_modified_time":"2025-04-03T17:41:54+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg","type":"","width":"","height":""}],"author":"Charnita Fance","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Charnita Fance","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/"},"author":{"name":"Charnita Fance","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/5d79508239e373fbbb7fd708976d7bd1"},"headline":"20 WordPress Shortcodes and Plugins You Might Want To Try","datePublished":"2014-01-23T10:01:06+00:00","dateModified":"2025-04-03T17:41:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/"},"wordCount":1404,"commentCount":7,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg","keywords":["ad-divi","WordPress Plugins","WordPress Tips"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/","url":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/","name":"20 WordPress Shortcodes and Plugins You Might Want To Try - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg","datePublished":"2014-01-23T10:01:06+00:00","dateModified":"2025-04-03T17:41:54+00:00","description":"If you are not familiar with shortcodes, a shortcode is a WordPress-specific code that lets you do creative things with scripts and code. Since you won't","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-shortcodes-plugins\/wordpress-shortcodes.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-shortcodes-plugins\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"20 WordPress Shortcodes and Plugins You Might Want To Try"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/5d79508239e373fbbb7fd708976d7bd1","name":"Charnita Fance","description":"Charnita is an Internet Marketing student at Full Sail University. She is also a part-time blogger. In her spare time she enjoys trying out new apps for the Web, PC, Mac and iPhone. You can find her latest blog posts at SocialWebTools.info.","url":"https:\/\/www.hongkiat.com\/blog\/author\/charnita\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-4YM","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=19144"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19144\/revisions"}],"predecessor-version":[{"id":73655,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19144\/revisions\/73655"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=19144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=19144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=19144"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=19144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}