{"id":194,"date":"2025-10-15T09:00:00","date_gmt":"2025-10-15T09:00:00","guid":{"rendered":"https:\/\/developryplugins.com\/?p=194"},"modified":"2025-11-24T11:18:22","modified_gmt":"2025-11-24T11:18:22","slug":"wordpress-shortcode-tutorial-create-powerful-reusable-content","status":"publish","type":"post","link":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/","title":{"rendered":"WordPress Shortcode Tutorial: Create Powerful Reusable Content"},"content":{"rendered":"<p><!-- @format --><\/p>\n<p>WordPress shortcodes transform complex functionality into simple, reusable snippets insertable anywhere via bracket syntax. From buttons and galleries to dynamic content and API integrations, shortcodes empower non-technical users to add sophisticated features without touching code. This comprehensive guide teaches shortcode creation, parameter handling, enclosing content, nesting, and optimization for powerful, maintainable WordPress functionality.<\/p>\n<h2 id=\"what-are-wordpress-shortcodes\">What Are WordPress Shortcodes<\/h2>\n<p>Shortcodes are WordPress-specific code macros executing complex functionality via simple syntax:<\/p>\n<pre><code>[shortcode]\n[shortcode attribute=&quot;value&quot;]\n[shortcode]content[\/shortcode]<\/code><\/pre>\n<p><strong>Built-In Shortcodes<\/strong>:<\/p>\n<ul>\n<li><code><div id='gallery-1' class='gallery galleryid-194 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/wordpress-shortcode-tutorial-create-powerful-reusable-content-2\/'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n<\/code> &#8211; Image gallery<\/li>\n<li><code><\/code> &#8211; Audio player<\/li>\n<li><code><\/code> &#8211; Video embed<\/li>\n<li><code><\/code> &#8211; URL embedding<\/li>\n<li><code><\/code> &#8211; Image captions<\/li>\n<\/ul>\n<h2 id=\"basic-shortcode-creation\">Basic Shortcode Creation<\/h2>\n<p><strong>Simple Shortcode<\/strong> (no parameters):<\/p>\n<div class=\"sourceCode\" id=\"cb2\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb2-1\"><a href=\"#cb2-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_button_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb2-2\"><a href=\"#cb2-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;a href=&quot;#&quot; class=&quot;btn btn-primary&quot;&gt;Click Here&lt;\/a&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb2-3\"><a href=\"#cb2-3\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb2-4\"><a href=\"#cb2-4\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;button&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_button_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb2-5\"><a href=\"#cb2-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb2-6\"><a href=\"#cb2-6\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [button]<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Output Multiple Elements<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb3\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb3-1\"><a href=\"#cb3-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_alert_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb3-2\"><a href=\"#cb3-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> = <span class=\"st\">&#39;&lt;div class=&quot;alert alert-info&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb3-3\"><a href=\"#cb3-3\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;strong&gt;Notice:&lt;\/strong&gt; This is an important message.&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb3-4\"><a href=\"#cb3-4\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb3-5\"><a href=\"#cb3-5\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb3-6\"><a href=\"#cb3-6\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb3-7\"><a href=\"#cb3-7\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;alert&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_alert_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb3-8\"><a href=\"#cb3-8\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb3-9\"><a href=\"#cb3-9\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [alert]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"shortcodes-with-attributes\">Shortcodes with Attributes<\/h2>\n<p><strong>Single Attribute<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb4\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb4-1\"><a href=\"#cb4-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_highlight_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb4-2\"><a href=\"#cb4-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb4-3\"><a href=\"#cb4-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;color&#39;<\/span> =&gt; <span class=\"st\">&#39;yellow&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"co\">\/\/ Default value<\/span><\/span>\n<span id=\"cb4-4\"><a href=\"#cb4-4\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb4-5\"><a href=\"#cb4-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb4-6\"><a href=\"#cb4-6\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;span style=&quot;background-color: &#39;<\/span> . esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;color&#39;<\/span><span class=\"ot\">])<\/span> . <span class=\"st\">&#39;; padding: 2px 5px;&quot;&gt;&#39;<\/span> . esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;color&#39;<\/span><span class=\"ot\">])<\/span> . <span class=\"st\">&#39;&lt;\/span&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb4-7\"><a href=\"#cb4-7\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb4-8\"><a href=\"#cb4-8\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;highlight&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_highlight_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb4-9\"><a href=\"#cb4-9\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb4-10\"><a href=\"#cb4-10\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage:<\/span><\/span>\n<span id=\"cb4-11\"><a href=\"#cb4-11\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [highlight color=&quot;red&quot;]<\/span><\/span>\n<span id=\"cb4-12\"><a href=\"#cb4-12\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [highlight] (uses default yellow)<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Multiple Attributes<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb5\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb5-1\"><a href=\"#cb5-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_custom_button_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb5-2\"><a href=\"#cb5-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb5-3\"><a href=\"#cb5-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;url&#39;<\/span> =&gt; <span class=\"st\">&#39;#&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-4\"><a href=\"#cb5-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;text&#39;<\/span> =&gt; <span class=\"st\">&#39;Click Here&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-5\"><a href=\"#cb5-5\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;color&#39;<\/span> =&gt; <span class=\"st\">&#39;blue&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-6\"><a href=\"#cb5-6\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;size&#39;<\/span> =&gt; <span class=\"st\">&#39;medium&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-7\"><a href=\"#cb5-7\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;target&#39;<\/span> =&gt; <span class=\"st\">&#39;_self&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-8\"><a href=\"#cb5-8\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb5-9\"><a href=\"#cb5-9\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb5-10\"><a href=\"#cb5-10\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$class<\/span> = <span class=\"st\">&#39;btn btn-&#39;<\/span> . esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;color&#39;<\/span><span class=\"ot\">])<\/span> . <span class=\"st\">&#39; btn-&#39;<\/span> . esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;size&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb5-11\"><a href=\"#cb5-11\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb5-12\"><a href=\"#cb5-12\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"fu\">sprintf<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb5-13\"><a href=\"#cb5-13\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;&lt;a href=&quot;%s&quot; class=&quot;%s&quot; target=&quot;%s&quot;&gt;%s&lt;\/a&gt;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb5-14\"><a href=\"#cb5-14\" aria-hidden=\"true\"><\/a>        esc_url<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;url&#39;<\/span><span class=\"ot\">]),<\/span><\/span>\n<span id=\"cb5-15\"><a href=\"#cb5-15\" aria-hidden=\"true\"><\/a>        esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$class<\/span><span class=\"ot\">),<\/span><\/span>\n<span id=\"cb5-16\"><a href=\"#cb5-16\" aria-hidden=\"true\"><\/a>        esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;target&#39;<\/span><span class=\"ot\">]),<\/span><\/span>\n<span id=\"cb5-17\"><a href=\"#cb5-17\" aria-hidden=\"true\"><\/a>        esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;text&#39;<\/span><span class=\"ot\">])<\/span><\/span>\n<span id=\"cb5-18\"><a href=\"#cb5-18\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">);<\/span><\/span>\n<span id=\"cb5-19\"><a href=\"#cb5-19\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb5-20\"><a href=\"#cb5-20\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;custom_button&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_custom_button_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb5-21\"><a href=\"#cb5-21\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb5-22\"><a href=\"#cb5-22\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [custom_button url=&quot;https:\/\/example.com&quot; text=&quot;Learn More&quot; color=&quot;green&quot; size=&quot;large&quot; target=&quot;_blank&quot;]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"enclosing-shortcodes-content-between-tags\">Enclosing Shortcodes (Content Between Tags)<\/h2>\n<p><strong>Basic Enclosing Shortcode<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb6\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb6-1\"><a href=\"#cb6-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_box_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb6-2\"><a href=\"#cb6-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb6-3\"><a href=\"#cb6-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;style&#39;<\/span> =&gt; <span class=\"st\">&#39;default&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb6-4\"><a href=\"#cb6-4\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb6-5\"><a href=\"#cb6-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb6-6\"><a href=\"#cb6-6\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$class<\/span> = <span class=\"st\">&#39;box box-&#39;<\/span> . esc_attr<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;style&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb6-7\"><a href=\"#cb6-7\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb6-8\"><a href=\"#cb6-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;div class=&quot;&#39;<\/span> . <span class=\"kw\">$class<\/span> . <span class=\"st\">&#39;&quot;&gt;&#39;<\/span> . do_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">)<\/span> . <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb6-9\"><a href=\"#cb6-9\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb6-10\"><a href=\"#cb6-10\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;box&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_box_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb6-11\"><a href=\"#cb6-11\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb6-12\"><a href=\"#cb6-12\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [box style=&quot;info&quot;]Your content here[\/box]<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Note<\/strong>: <code>do_shortcode($content)<\/code> processes nested shortcodes within content.<\/p>\n<p><strong>Formatting Content<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb7\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb7-1\"><a href=\"#cb7-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_quote_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb7-2\"><a href=\"#cb7-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb7-3\"><a href=\"#cb7-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;author&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb7-4\"><a href=\"#cb7-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;source&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb7-5\"><a href=\"#cb7-5\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb7-6\"><a href=\"#cb7-6\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb7-7\"><a href=\"#cb7-7\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> = <span class=\"st\">&#39;&lt;blockquote class=&quot;custom-quote&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb7-8\"><a href=\"#cb7-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= wpautop<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">);<\/span> <span class=\"co\">\/\/ Converts line breaks to paragraphs<\/span><\/span>\n<span id=\"cb7-9\"><a href=\"#cb7-9\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">empty<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;author&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb7-10\"><a href=\"#cb7-10\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;cite&gt;\u2014 &#39;<\/span> . esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;author&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb7-11\"><a href=\"#cb7-11\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">empty<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;source&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb7-12\"><a href=\"#cb7-12\" aria-hidden=\"true\"><\/a>            <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;, &lt;em&gt;&#39;<\/span> . esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;source&#39;<\/span><span class=\"ot\">])<\/span> . <span class=\"st\">&#39;&lt;\/em&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb7-13\"><a href=\"#cb7-13\" aria-hidden=\"true\"><\/a>        }<\/span>\n<span id=\"cb7-14\"><a href=\"#cb7-14\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/cite&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb7-15\"><a href=\"#cb7-15\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb7-16\"><a href=\"#cb7-16\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/blockquote&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb7-17\"><a href=\"#cb7-17\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb7-18\"><a href=\"#cb7-18\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb7-19\"><a href=\"#cb7-19\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb7-20\"><a href=\"#cb7-20\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;quote&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_quote_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb7-21\"><a href=\"#cb7-21\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb7-22\"><a href=\"#cb7-22\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage:<\/span><\/span>\n<span id=\"cb7-23\"><a href=\"#cb7-23\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [quote author=&quot;Steve Jobs&quot; source=&quot;Stanford Commencement 2005&quot;]<\/span><\/span>\n<span id=\"cb7-24\"><a href=\"#cb7-24\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Stay hungry. Stay foolish.<\/span><\/span>\n<span id=\"cb7-25\"><a href=\"#cb7-25\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [\/quote]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"dynamic-content-shortcodes\">Dynamic Content Shortcodes<\/h2>\n<p><strong>Display Post Count<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb8\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb8-1\"><a href=\"#cb8-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_post_count_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb8-2\"><a href=\"#cb8-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb8-3\"><a href=\"#cb8-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;post_type&#39;<\/span> =&gt; <span class=\"st\">&#39;post&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb8-4\"><a href=\"#cb8-4\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb8-5\"><a href=\"#cb8-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb8-6\"><a href=\"#cb8-6\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$count<\/span> = wp_count_posts<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;post_type&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb8-7\"><a href=\"#cb8-7\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> number_format_i18n<span class=\"ot\">(<\/span><span class=\"kw\">$count<\/span>-&gt;publish<span class=\"ot\">);<\/span><\/span>\n<span id=\"cb8-8\"><a href=\"#cb8-8\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb8-9\"><a href=\"#cb8-9\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;post_count&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_post_count_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb8-10\"><a href=\"#cb8-10\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb8-11\"><a href=\"#cb8-11\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [post_count post_type=&quot;product&quot;]<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Recent Posts List<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb9\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb9-1\"><a href=\"#cb9-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_recent_posts_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb9-2\"><a href=\"#cb9-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb9-3\"><a href=\"#cb9-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;posts_per_page&#39;<\/span> =&gt; <span class=\"dv\">5<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb9-4\"><a href=\"#cb9-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;post_type&#39;<\/span> =&gt; <span class=\"st\">&#39;post&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb9-5\"><a href=\"#cb9-5\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;category&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb9-6\"><a href=\"#cb9-6\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb9-7\"><a href=\"#cb9-7\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-8\"><a href=\"#cb9-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$args<\/span> = <span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb9-9\"><a href=\"#cb9-9\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;posts_per_page&#39;<\/span> =&gt; <span class=\"fu\">intval<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;posts_per_page&#39;<\/span><span class=\"ot\">]),<\/span><\/span>\n<span id=\"cb9-10\"><a href=\"#cb9-10\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;post_type&#39;<\/span> =&gt; <span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;post_type&#39;<\/span><span class=\"ot\">],<\/span><\/span>\n<span id=\"cb9-11\"><a href=\"#cb9-11\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;post_status&#39;<\/span> =&gt; <span class=\"st\">&#39;publish&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb9-12\"><a href=\"#cb9-12\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">);<\/span><\/span>\n<span id=\"cb9-13\"><a href=\"#cb9-13\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-14\"><a href=\"#cb9-14\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">empty<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;category&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb9-15\"><a href=\"#cb9-15\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$args<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;category_name&#39;<\/span><span class=\"ot\">]<\/span> = <span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;category&#39;<\/span><span class=\"ot\">];<\/span><\/span>\n<span id=\"cb9-16\"><a href=\"#cb9-16\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb9-17\"><a href=\"#cb9-17\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-18\"><a href=\"#cb9-18\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$query<\/span> = <span class=\"kw\">new<\/span> WP_Query<span class=\"ot\">(<\/span><span class=\"kw\">$args<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb9-19\"><a href=\"#cb9-19\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-20\"><a href=\"#cb9-20\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">$query<\/span>-&gt;have_posts<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb9-21\"><a href=\"#cb9-21\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;p&gt;No posts found.&lt;\/p&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb9-22\"><a href=\"#cb9-22\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb9-23\"><a href=\"#cb9-23\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-24\"><a href=\"#cb9-24\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> = <span class=\"st\">&#39;&lt;ul class=&quot;recent-posts&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb9-25\"><a href=\"#cb9-25\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">while<\/span> <span class=\"ot\">(<\/span><span class=\"kw\">$query<\/span>-&gt;have_posts<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb9-26\"><a href=\"#cb9-26\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$query<\/span>-&gt;the_post<span class=\"ot\">();<\/span><\/span>\n<span id=\"cb9-27\"><a href=\"#cb9-27\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;li&gt;&lt;a href=&quot;&#39;<\/span> . get_permalink<span class=\"ot\">()<\/span> . <span class=\"st\">&#39;&quot;&gt;&#39;<\/span> . get_the_title<span class=\"ot\">()<\/span> . <span class=\"st\">&#39;&lt;\/a&gt;&lt;\/li&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb9-28\"><a href=\"#cb9-28\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb9-29\"><a href=\"#cb9-29\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/ul&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb9-30\"><a href=\"#cb9-30\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-31\"><a href=\"#cb9-31\" aria-hidden=\"true\"><\/a>    wp_reset_postdata<span class=\"ot\">();<\/span><\/span>\n<span id=\"cb9-32\"><a href=\"#cb9-32\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-33\"><a href=\"#cb9-33\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb9-34\"><a href=\"#cb9-34\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb9-35\"><a href=\"#cb9-35\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;recent_posts&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_recent_posts_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb9-36\"><a href=\"#cb9-36\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb9-37\"><a href=\"#cb9-37\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [recent_posts posts_per_page=&quot;10&quot; category=&quot;news&quot;]<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Current Year<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb10\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb10-1\"><a href=\"#cb10-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_current_year_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb10-2\"><a href=\"#cb10-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"fu\">date<\/span><span class=\"ot\">(<\/span><span class=\"st\">&#39;Y&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb10-3\"><a href=\"#cb10-3\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb10-4\"><a href=\"#cb10-4\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;year&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_current_year_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb10-5\"><a href=\"#cb10-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb10-6\"><a href=\"#cb10-6\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: Copyright [year] Your Company<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"conditional-shortcodes\">Conditional Shortcodes<\/h2>\n<p><strong>Display Content for Logged-In Users<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb11\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb11-1\"><a href=\"#cb11-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_members_only_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb11-2\"><a href=\"#cb11-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>is_user_logged_in<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb11-3\"><a href=\"#cb11-3\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;div class=&quot;members-content&quot;&gt;&#39;<\/span> . do_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">)<\/span> . <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb11-4\"><a href=\"#cb11-4\" aria-hidden=\"true\"><\/a>    } <span class=\"kw\">else<\/span> {<\/span>\n<span id=\"cb11-5\"><a href=\"#cb11-5\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;div class=&quot;login-notice&quot;&gt;Please &lt;a href=&quot;&#39;<\/span> . wp_login_url<span class=\"ot\">(<\/span>get_permalink<span class=\"ot\">())<\/span> . <span class=\"st\">&#39;&quot;&gt;log in&lt;\/a&gt; to view this content.&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb11-6\"><a href=\"#cb11-6\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb11-7\"><a href=\"#cb11-7\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb11-8\"><a href=\"#cb11-8\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;members_only&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_members_only_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb11-9\"><a href=\"#cb11-9\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb11-10\"><a href=\"#cb11-10\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage:<\/span><\/span>\n<span id=\"cb11-11\"><a href=\"#cb11-11\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [members_only]<\/span><\/span>\n<span id=\"cb11-12\"><a href=\"#cb11-12\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Exclusive content for members<\/span><\/span>\n<span id=\"cb11-13\"><a href=\"#cb11-13\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [\/members_only]<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Role-Based Content<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb12\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb12-1\"><a href=\"#cb12-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_role_content_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb12-2\"><a href=\"#cb12-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb12-3\"><a href=\"#cb12-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;role&#39;<\/span> =&gt; <span class=\"st\">&#39;subscriber&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb12-4\"><a href=\"#cb12-4\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb12-5\"><a href=\"#cb12-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb12-6\"><a href=\"#cb12-6\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>current_user_can<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;role&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb12-7\"><a href=\"#cb12-7\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">return<\/span> do_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb12-8\"><a href=\"#cb12-8\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb12-9\"><a href=\"#cb12-9\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb12-10\"><a href=\"#cb12-10\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb12-11\"><a href=\"#cb12-11\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb12-12\"><a href=\"#cb12-12\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;role_content&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_role_content_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb12-13\"><a href=\"#cb12-13\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb12-14\"><a href=\"#cb12-14\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [role_content role=&quot;administrator&quot;]Admin only content[\/role_content]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"query-based-shortcodes\">Query-Based Shortcodes<\/h2>\n<p><strong>Custom Loop Shortcode<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb13\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb13-1\"><a href=\"#cb13-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_products_grid_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb13-2\"><a href=\"#cb13-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb13-3\"><a href=\"#cb13-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;category&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-4\"><a href=\"#cb13-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;count&#39;<\/span> =&gt; <span class=\"dv\">6<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-5\"><a href=\"#cb13-5\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;columns&#39;<\/span> =&gt; <span class=\"dv\">3<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-6\"><a href=\"#cb13-6\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-7\"><a href=\"#cb13-7\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-8\"><a href=\"#cb13-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$args<\/span> = <span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb13-9\"><a href=\"#cb13-9\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;post_type&#39;<\/span> =&gt; <span class=\"st\">&#39;product&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-10\"><a href=\"#cb13-10\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;posts_per_page&#39;<\/span> =&gt; <span class=\"fu\">intval<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;count&#39;<\/span><span class=\"ot\">]),<\/span><\/span>\n<span id=\"cb13-11\"><a href=\"#cb13-11\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-12\"><a href=\"#cb13-12\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-13\"><a href=\"#cb13-13\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">empty<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;category&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb13-14\"><a href=\"#cb13-14\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$args<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;tax_query&#39;<\/span><span class=\"ot\">]<\/span> = <span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb13-15\"><a href=\"#cb13-15\" aria-hidden=\"true\"><\/a>            <span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb13-16\"><a href=\"#cb13-16\" aria-hidden=\"true\"><\/a>                <span class=\"st\">&#39;taxonomy&#39;<\/span> =&gt; <span class=\"st\">&#39;product_category&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-17\"><a href=\"#cb13-17\" aria-hidden=\"true\"><\/a>                <span class=\"st\">&#39;field&#39;<\/span> =&gt; <span class=\"st\">&#39;slug&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb13-18\"><a href=\"#cb13-18\" aria-hidden=\"true\"><\/a>                <span class=\"st\">&#39;terms&#39;<\/span> =&gt; <span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;category&#39;<\/span><span class=\"ot\">],<\/span><\/span>\n<span id=\"cb13-19\"><a href=\"#cb13-19\" aria-hidden=\"true\"><\/a>            <span class=\"ot\">),<\/span><\/span>\n<span id=\"cb13-20\"><a href=\"#cb13-20\" aria-hidden=\"true\"><\/a>        <span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-21\"><a href=\"#cb13-21\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb13-22\"><a href=\"#cb13-22\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-23\"><a href=\"#cb13-23\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$query<\/span> = <span class=\"kw\">new<\/span> WP_Query<span class=\"ot\">(<\/span><span class=\"kw\">$args<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-24\"><a href=\"#cb13-24\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-25\"><a href=\"#cb13-25\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">$query<\/span>-&gt;have_posts<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb13-26\"><a href=\"#cb13-26\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;p&gt;No products found.&lt;\/p&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-27\"><a href=\"#cb13-27\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb13-28\"><a href=\"#cb13-28\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-29\"><a href=\"#cb13-29\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$column_class<\/span> = <span class=\"st\">&#39;col-md-&#39;<\/span> . <span class=\"ot\">(<\/span><span class=\"dv\">12<\/span> \/ <span class=\"fu\">intval<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;columns&#39;<\/span><span class=\"ot\">]));<\/span><\/span>\n<span id=\"cb13-30\"><a href=\"#cb13-30\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> = <span class=\"st\">&#39;&lt;div class=&quot;products-grid row&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-31\"><a href=\"#cb13-31\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-32\"><a href=\"#cb13-32\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">while<\/span> <span class=\"ot\">(<\/span><span class=\"kw\">$query<\/span>-&gt;have_posts<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb13-33\"><a href=\"#cb13-33\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$query<\/span>-&gt;the_post<span class=\"ot\">();<\/span><\/span>\n<span id=\"cb13-34\"><a href=\"#cb13-34\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;div class=&quot;&#39;<\/span> . <span class=\"kw\">$column_class<\/span> . <span class=\"st\">&#39; product-item&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-35\"><a href=\"#cb13-35\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;a href=&quot;&#39;<\/span> . get_permalink<span class=\"ot\">()<\/span> . <span class=\"st\">&#39;&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-36\"><a href=\"#cb13-36\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>has_post_thumbnail<span class=\"ot\">())<\/span> {<\/span>\n<span id=\"cb13-37\"><a href=\"#cb13-37\" aria-hidden=\"true\"><\/a>            <span class=\"kw\">$output<\/span> .= get_the_post_thumbnail<span class=\"ot\">(<\/span>get_the_ID<span class=\"ot\">(),<\/span> <span class=\"st\">&#39;medium&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-38\"><a href=\"#cb13-38\" aria-hidden=\"true\"><\/a>        }<\/span>\n<span id=\"cb13-39\"><a href=\"#cb13-39\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;h3&gt;&#39;<\/span> . get_the_title<span class=\"ot\">()<\/span> . <span class=\"st\">&#39;&lt;\/h3&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-40\"><a href=\"#cb13-40\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/a&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-41\"><a href=\"#cb13-41\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-42\"><a href=\"#cb13-42\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb13-43\"><a href=\"#cb13-43\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-44\"><a href=\"#cb13-44\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-45\"><a href=\"#cb13-45\" aria-hidden=\"true\"><\/a>    wp_reset_postdata<span class=\"ot\">();<\/span><\/span>\n<span id=\"cb13-46\"><a href=\"#cb13-46\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-47\"><a href=\"#cb13-47\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb13-48\"><a href=\"#cb13-48\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb13-49\"><a href=\"#cb13-49\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;products_grid&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_products_grid_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb13-50\"><a href=\"#cb13-50\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb13-51\"><a href=\"#cb13-51\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage: [products_grid category=&quot;featured&quot; count=&quot;9&quot; columns=&quot;3&quot;]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"form-shortcodes\">Form Shortcodes<\/h2>\n<p><strong>Contact Form<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb14\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb14-1\"><a href=\"#cb14-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_contact_form_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb14-2\"><a href=\"#cb14-2\" aria-hidden=\"true\"><\/a>    <span class=\"fu\">ob_start<\/span><span class=\"ot\">();<\/span><\/span>\n<span id=\"cb14-3\"><a href=\"#cb14-3\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">?&gt;<\/span><\/span>\n<span id=\"cb14-4\"><a href=\"#cb14-4\" aria-hidden=\"true\"><\/a>    &lt;form method=<span class=\"st\">&quot;post&quot;<\/span> action=<span class=\"st\">&quot;&quot;<\/span> <span class=\"kw\">class<\/span>=<span class=\"st\">&quot;contact-form&quot;<\/span>&gt;<\/span>\n<span id=\"cb14-5\"><a href=\"#cb14-5\" aria-hidden=\"true\"><\/a>        &lt;<span class=\"ot\">?<\/span>php wp_nonce_field<span class=\"ot\">(<\/span><span class=\"st\">&#39;contact_form_submit&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;contact_form_nonce&#39;<\/span><span class=\"ot\">);<\/span> <span class=\"kw\">?&gt;<\/span><\/span>\n<span id=\"cb14-6\"><a href=\"#cb14-6\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-7\"><a href=\"#cb14-7\" aria-hidden=\"true\"><\/a>        &lt;p&gt;<\/span>\n<span id=\"cb14-8\"><a href=\"#cb14-8\" aria-hidden=\"true\"><\/a>            &lt;label <span class=\"kw\">for<\/span>=<span class=\"st\">&quot;name&quot;<\/span>&gt;Name:&lt;\/label&gt;<\/span>\n<span id=\"cb14-9\"><a href=\"#cb14-9\" aria-hidden=\"true\"><\/a>            &lt;input type=<span class=\"st\">&quot;text&quot;<\/span> name=<span class=\"st\">&quot;name&quot;<\/span> id=<span class=\"st\">&quot;name&quot;<\/span> required&gt;<\/span>\n<span id=\"cb14-10\"><a href=\"#cb14-10\" aria-hidden=\"true\"><\/a>        &lt;\/p&gt;<\/span>\n<span id=\"cb14-11\"><a href=\"#cb14-11\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-12\"><a href=\"#cb14-12\" aria-hidden=\"true\"><\/a>        &lt;p&gt;<\/span>\n<span id=\"cb14-13\"><a href=\"#cb14-13\" aria-hidden=\"true\"><\/a>            &lt;label <span class=\"kw\">for<\/span>=<span class=\"st\">&quot;email&quot;<\/span>&gt;Email:&lt;\/label&gt;<\/span>\n<span id=\"cb14-14\"><a href=\"#cb14-14\" aria-hidden=\"true\"><\/a>            &lt;input type=<span class=\"st\">&quot;email&quot;<\/span> name=<span class=\"st\">&quot;email&quot;<\/span> id=<span class=\"st\">&quot;email&quot;<\/span> required&gt;<\/span>\n<span id=\"cb14-15\"><a href=\"#cb14-15\" aria-hidden=\"true\"><\/a>        &lt;\/p&gt;<\/span>\n<span id=\"cb14-16\"><a href=\"#cb14-16\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-17\"><a href=\"#cb14-17\" aria-hidden=\"true\"><\/a>        &lt;p&gt;<\/span>\n<span id=\"cb14-18\"><a href=\"#cb14-18\" aria-hidden=\"true\"><\/a>            &lt;label <span class=\"kw\">for<\/span>=<span class=\"st\">&quot;message&quot;<\/span>&gt;Message:&lt;\/label&gt;<\/span>\n<span id=\"cb14-19\"><a href=\"#cb14-19\" aria-hidden=\"true\"><\/a>            &lt;textarea name=<span class=\"st\">&quot;message&quot;<\/span> id=<span class=\"st\">&quot;message&quot;<\/span> rows=<span class=\"st\">&quot;5&quot;<\/span> required&gt;&lt;\/textarea&gt;<\/span>\n<span id=\"cb14-20\"><a href=\"#cb14-20\" aria-hidden=\"true\"><\/a>        &lt;\/p&gt;<\/span>\n<span id=\"cb14-21\"><a href=\"#cb14-21\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-22\"><a href=\"#cb14-22\" aria-hidden=\"true\"><\/a>        &lt;p&gt;<\/span>\n<span id=\"cb14-23\"><a href=\"#cb14-23\" aria-hidden=\"true\"><\/a>            &lt;button type=<span class=\"st\">&quot;submit&quot;<\/span> name=<span class=\"st\">&quot;submit_contact&quot;<\/span>&gt;Send Message&lt;\/button&gt;<\/span>\n<span id=\"cb14-24\"><a href=\"#cb14-24\" aria-hidden=\"true\"><\/a>        &lt;\/p&gt;<\/span>\n<span id=\"cb14-25\"><a href=\"#cb14-25\" aria-hidden=\"true\"><\/a>    &lt;\/form&gt;<\/span>\n<span id=\"cb14-26\"><a href=\"#cb14-26\" aria-hidden=\"true\"><\/a>    &lt;<span class=\"ot\">?<\/span>php<\/span>\n<span id=\"cb14-27\"><a href=\"#cb14-27\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"fu\">ob_get_clean<\/span><span class=\"ot\">();<\/span><\/span>\n<span id=\"cb14-28\"><a href=\"#cb14-28\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb14-29\"><a href=\"#cb14-29\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;contact_form&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_contact_form_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb14-30\"><a href=\"#cb14-30\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-31\"><a href=\"#cb14-31\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Form processing (add separately)<\/span><\/span>\n<span id=\"cb14-32\"><a href=\"#cb14-32\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_process_contact_form<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb14-33\"><a href=\"#cb14-33\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span><span class=\"kw\">isset<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;submit_contact&#39;<\/span><span class=\"ot\">]))<\/span> {<\/span>\n<span id=\"cb14-34\"><a href=\"#cb14-34\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>!<span class=\"kw\">isset<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;contact_form_nonce&#39;<\/span><span class=\"ot\">])<\/span> || !wp_verify_nonce<span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;contact_form_nonce&#39;<\/span><span class=\"ot\">],<\/span> <span class=\"st\">&#39;contact_form_submit&#39;<\/span><span class=\"ot\">))<\/span> {<\/span>\n<span id=\"cb14-35\"><a href=\"#cb14-35\" aria-hidden=\"true\"><\/a>            wp_die<span class=\"ot\">(<\/span><span class=\"st\">&#39;Security check failed&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb14-36\"><a href=\"#cb14-36\" aria-hidden=\"true\"><\/a>        }<\/span>\n<span id=\"cb14-37\"><a href=\"#cb14-37\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-38\"><a href=\"#cb14-38\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$name<\/span> = sanitize_text_field<span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;name&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb14-39\"><a href=\"#cb14-39\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$email<\/span> = sanitize_email<span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;email&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb14-40\"><a href=\"#cb14-40\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$message<\/span> = sanitize_textarea_field<span class=\"ot\">(<\/span><span class=\"kw\">$_POST<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;message&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb14-41\"><a href=\"#cb14-41\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb14-42\"><a href=\"#cb14-42\" aria-hidden=\"true\"><\/a>        <span class=\"co\">\/\/ Process form (send email, save to database, etc.)<\/span><\/span>\n<span id=\"cb14-43\"><a href=\"#cb14-43\" aria-hidden=\"true\"><\/a>        wp_mail<span class=\"ot\">(<\/span><span class=\"st\">&#39;admin@example.com&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;Contact Form Submission&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$message<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb14-44\"><a href=\"#cb14-44\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb14-45\"><a href=\"#cb14-45\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb14-46\"><a href=\"#cb14-46\" aria-hidden=\"true\"><\/a>add_action<span class=\"ot\">(<\/span><span class=\"st\">&#39;template_redirect&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_process_contact_form&#39;<\/span><span class=\"ot\">);<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"api-integration-shortcodes\">API Integration Shortcodes<\/h2>\n<p><strong>External Data Display<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb15\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb15-1\"><a href=\"#cb15-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_api_data_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb15-2\"><a href=\"#cb15-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb15-3\"><a href=\"#cb15-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;endpoint&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb15-4\"><a href=\"#cb15-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;cache_time&#39;<\/span> =&gt; <span class=\"dv\">3600<\/span><span class=\"ot\">,<\/span> <span class=\"co\">\/\/ Cache for 1 hour<\/span><\/span>\n<span id=\"cb15-5\"><a href=\"#cb15-5\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb15-6\"><a href=\"#cb15-6\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-7\"><a href=\"#cb15-7\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$cache_key<\/span> = <span class=\"st\">&#39;api_data_&#39;<\/span> . <span class=\"fu\">md5<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;endpoint&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb15-8\"><a href=\"#cb15-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$data<\/span> = get_transient<span class=\"ot\">(<\/span><span class=\"kw\">$cache_key<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb15-9\"><a href=\"#cb15-9\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-10\"><a href=\"#cb15-10\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span><span class=\"kw\">false<\/span> === <span class=\"kw\">$data<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb15-11\"><a href=\"#cb15-11\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$response<\/span> = wp_remote_get<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;endpoint&#39;<\/span><span class=\"ot\">]);<\/span><\/span>\n<span id=\"cb15-12\"><a href=\"#cb15-12\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">if<\/span> <span class=\"ot\">(<\/span>is_wp_error<span class=\"ot\">(<\/span><span class=\"kw\">$response<\/span><span class=\"ot\">))<\/span> {<\/span>\n<span id=\"cb15-13\"><a href=\"#cb15-13\" aria-hidden=\"true\"><\/a>            <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;p&gt;Error fetching data.&lt;\/p&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb15-14\"><a href=\"#cb15-14\" aria-hidden=\"true\"><\/a>        }<\/span>\n<span id=\"cb15-15\"><a href=\"#cb15-15\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-16\"><a href=\"#cb15-16\" aria-hidden=\"true\"><\/a>        <span class=\"kw\">$data<\/span> = wp_remote_retrieve_body<span class=\"ot\">(<\/span><span class=\"kw\">$response<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb15-17\"><a href=\"#cb15-17\" aria-hidden=\"true\"><\/a>        set_transient<span class=\"ot\">(<\/span><span class=\"kw\">$cache_key<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$data<\/span><span class=\"ot\">,<\/span> <span class=\"fu\">intval<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;cache_time&#39;<\/span><span class=\"ot\">]));<\/span><\/span>\n<span id=\"cb15-18\"><a href=\"#cb15-18\" aria-hidden=\"true\"><\/a>    }<\/span>\n<span id=\"cb15-19\"><a href=\"#cb15-19\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-20\"><a href=\"#cb15-20\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$json<\/span> = <span class=\"fu\">json_decode<\/span><span class=\"ot\">(<\/span><span class=\"kw\">$data<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">true<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb15-21\"><a href=\"#cb15-21\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-22\"><a href=\"#cb15-22\" aria-hidden=\"true\"><\/a>    <span class=\"co\">\/\/ Format and return data<\/span><\/span>\n<span id=\"cb15-23\"><a href=\"#cb15-23\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> = <span class=\"st\">&#39;&lt;div class=&quot;api-data&quot;&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb15-24\"><a href=\"#cb15-24\" aria-hidden=\"true\"><\/a>    <span class=\"co\">\/\/ Process $json as needed<\/span><\/span>\n<span id=\"cb15-25\"><a href=\"#cb15-25\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$output<\/span> .= <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb15-26\"><a href=\"#cb15-26\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb15-27\"><a href=\"#cb15-27\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb15-28\"><a href=\"#cb15-28\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb15-29\"><a href=\"#cb15-29\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;api_data&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_api_data_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"nested-shortcodes\">Nested Shortcodes<\/h2>\n<p><strong>Tabs Shortcode System<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb16\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb16-1\"><a href=\"#cb16-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_tabs_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb16-2\"><a href=\"#cb16-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;div class=&quot;tabs-container&quot;&gt;&#39;<\/span> . do_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">)<\/span> . <span class=\"st\">&#39;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb16-3\"><a href=\"#cb16-3\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb16-4\"><a href=\"#cb16-4\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;tabs&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_tabs_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb16-5\"><a href=\"#cb16-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb16-6\"><a href=\"#cb16-6\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_tab_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb16-7\"><a href=\"#cb16-7\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb16-8\"><a href=\"#cb16-8\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;title&#39;<\/span> =&gt; <span class=\"st\">&#39;Tab&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb16-9\"><a href=\"#cb16-9\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb16-10\"><a href=\"#cb16-10\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb16-11\"><a href=\"#cb16-11\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;&lt;div class=&quot;tab&quot;&gt;&lt;h3&gt;&#39;<\/span> . esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;title&#39;<\/span><span class=\"ot\">])<\/span> . <span class=\"st\">&#39;&lt;\/h3&gt;&lt;div class=&quot;tab-content&quot;&gt;&#39;<\/span> . do_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$content<\/span><span class=\"ot\">)<\/span> . <span class=\"st\">&#39;&lt;\/div&gt;&lt;\/div&gt;&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb16-12\"><a href=\"#cb16-12\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb16-13\"><a href=\"#cb16-13\" aria-hidden=\"true\"><\/a>add_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;tab&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_tab_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb16-14\"><a href=\"#cb16-14\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb16-15\"><a href=\"#cb16-15\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Usage:<\/span><\/span>\n<span id=\"cb16-16\"><a href=\"#cb16-16\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [tabs]<\/span><\/span>\n<span id=\"cb16-17\"><a href=\"#cb16-17\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/   [tab title=&quot;Features&quot;]Content about features[\/tab]<\/span><\/span>\n<span id=\"cb16-18\"><a href=\"#cb16-18\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/   [tab title=&quot;Pricing&quot;]Content about pricing[\/tab]<\/span><\/span>\n<span id=\"cb16-19\"><a href=\"#cb16-19\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/   [tab title=&quot;Support&quot;]Content about support[\/tab]<\/span><\/span>\n<span id=\"cb16-20\"><a href=\"#cb16-20\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ [\/tabs]<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"shortcode-best-practices\">Shortcode Best Practices<\/h2>\n<p><strong>1. Always Sanitize and Escape<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb17\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb17-1\"><a href=\"#cb17-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_secure_shortcode<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">$content<\/span> = <span class=\"kw\">null<\/span><span class=\"ot\">)<\/span> {<\/span>\n<span id=\"cb17-2\"><a href=\"#cb17-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$atts<\/span> = shortcode_atts<span class=\"ot\">(<\/span><span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb17-3\"><a href=\"#cb17-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;url&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb17-4\"><a href=\"#cb17-4\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;text&#39;<\/span> =&gt; <span class=\"st\">&#39;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb17-5\"><a href=\"#cb17-5\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">),<\/span> <span class=\"kw\">$atts<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb17-6\"><a href=\"#cb17-6\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb17-7\"><a href=\"#cb17-7\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"fu\">sprintf<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb17-8\"><a href=\"#cb17-8\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;&lt;a href=&quot;%s&quot;&gt;%s&lt;\/a&gt;&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb17-9\"><a href=\"#cb17-9\" aria-hidden=\"true\"><\/a>        esc_url<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;url&#39;<\/span><span class=\"ot\">]),<\/span>      <span class=\"co\">\/\/ Escape URL<\/span><\/span>\n<span id=\"cb17-10\"><a href=\"#cb17-10\" aria-hidden=\"true\"><\/a>        esc_html<span class=\"ot\">(<\/span><span class=\"kw\">$atts<\/span><span class=\"ot\">[<\/span><span class=\"st\">&#39;text&#39;<\/span><span class=\"ot\">])<\/span>     <span class=\"co\">\/\/ Escape text<\/span><\/span>\n<span id=\"cb17-11\"><a href=\"#cb17-11\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">);<\/span><\/span>\n<span id=\"cb17-12\"><a href=\"#cb17-12\" aria-hidden=\"true\"><\/a>}<\/span><\/code><\/pre>\n<\/div>\n<p><strong>2. Return, Don\u2019t Echo<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb18\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb18-1\"><a href=\"#cb18-1\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ WRONG<\/span><\/span>\n<span id=\"cb18-2\"><a href=\"#cb18-2\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> bad_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb18-3\"><a href=\"#cb18-3\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">echo<\/span> <span class=\"st\">&#39;Content&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb18-4\"><a href=\"#cb18-4\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb18-5\"><a href=\"#cb18-5\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb18-6\"><a href=\"#cb18-6\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ CORRECT<\/span><\/span>\n<span id=\"cb18-7\"><a href=\"#cb18-7\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> good_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb18-8\"><a href=\"#cb18-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"st\">&#39;Content&#39;<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb18-9\"><a href=\"#cb18-9\" aria-hidden=\"true\"><\/a>}<\/span><\/code><\/pre>\n<\/div>\n<p><strong>3. Use Output Buffering for Complex HTML<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb19\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb19-1\"><a href=\"#cb19-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_complex_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb19-2\"><a href=\"#cb19-2\" aria-hidden=\"true\"><\/a>    <span class=\"fu\">ob_start<\/span><span class=\"ot\">();<\/span><\/span>\n<span id=\"cb19-3\"><a href=\"#cb19-3\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">?&gt;<\/span><\/span>\n<span id=\"cb19-4\"><a href=\"#cb19-4\" aria-hidden=\"true\"><\/a>    &lt;div <span class=\"kw\">class<\/span>=<span class=\"st\">&quot;complex-element&quot;<\/span>&gt;<\/span>\n<span id=\"cb19-5\"><a href=\"#cb19-5\" aria-hidden=\"true\"><\/a>        &lt;!-- Complex <span class=\"kw\">HTML<\/span> structure --&gt;<\/span>\n<span id=\"cb19-6\"><a href=\"#cb19-6\" aria-hidden=\"true\"><\/a>    &lt;\/div&gt;<\/span>\n<span id=\"cb19-7\"><a href=\"#cb19-7\" aria-hidden=\"true\"><\/a>    &lt;<span class=\"ot\">?<\/span>php<\/span>\n<span id=\"cb19-8\"><a href=\"#cb19-8\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"fu\">ob_get_clean<\/span><span class=\"ot\">();<\/span><\/span>\n<span id=\"cb19-9\"><a href=\"#cb19-9\" aria-hidden=\"true\"><\/a>}<\/span><\/code><\/pre>\n<\/div>\n<p><strong>4. Reset Post Data After Queries<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb20\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb20-1\"><a href=\"#cb20-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_query_shortcode<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb20-2\"><a href=\"#cb20-2\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">$query<\/span> = <span class=\"kw\">new<\/span> WP_Query<span class=\"ot\">(<\/span><span class=\"kw\">$args<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb20-3\"><a href=\"#cb20-3\" aria-hidden=\"true\"><\/a>    <span class=\"co\">\/\/ ... loop through posts<\/span><\/span>\n<span id=\"cb20-4\"><a href=\"#cb20-4\" aria-hidden=\"true\"><\/a>    wp_reset_postdata<span class=\"ot\">();<\/span> <span class=\"co\">\/\/ IMPORTANT!<\/span><\/span>\n<span id=\"cb20-5\"><a href=\"#cb20-5\" aria-hidden=\"true\"><\/a>    <span class=\"kw\">return<\/span> <span class=\"kw\">$output<\/span><span class=\"ot\">;<\/span><\/span>\n<span id=\"cb20-6\"><a href=\"#cb20-6\" aria-hidden=\"true\"><\/a>}<\/span><\/code><\/pre>\n<\/div>\n<p><strong>5. Prefix Shortcode Names<\/strong>: Avoid conflicts by prefixing.<\/p>\n<div class=\"sourceCode\" id=\"cb21\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb21-1\"><a href=\"#cb21-1\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Good: dprt_button<\/span><\/span>\n<span id=\"cb21-2\"><a href=\"#cb21-2\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Bad: button (could conflict with plugin\/theme)<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"removing-shortcodes\">Removing Shortcodes<\/h2>\n<div class=\"sourceCode\" id=\"cb22\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb22-1\"><a href=\"#cb22-1\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Remove specific shortcode<\/span><\/span>\n<span id=\"cb22-2\"><a href=\"#cb22-2\" aria-hidden=\"true\"><\/a>remove_shortcode<span class=\"ot\">(<\/span><span class=\"st\">&#39;gallery&#39;<\/span><span class=\"ot\">);<\/span><\/span>\n<span id=\"cb22-3\"><a href=\"#cb22-3\" aria-hidden=\"true\"><\/a><\/span>\n<span id=\"cb22-4\"><a href=\"#cb22-4\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Remove all shortcodes<\/span><\/span>\n<span id=\"cb22-5\"><a href=\"#cb22-5\" aria-hidden=\"true\"><\/a>remove_all_shortcodes<span class=\"ot\">();<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"shortcode-ui-with-gutenberg\">Shortcode UI with Gutenberg<\/h2>\n<p><strong>Register Shortcode Block<\/strong> (for Gutenberg):<\/p>\n<div class=\"sourceCode\" id=\"cb23\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb23-1\"><a href=\"#cb23-1\" aria-hidden=\"true\"><\/a><span class=\"kw\">function<\/span> dprt_register_shortcode_block<span class=\"ot\">()<\/span> {<\/span>\n<span id=\"cb23-2\"><a href=\"#cb23-2\" aria-hidden=\"true\"><\/a>    register_block_type<span class=\"ot\">(<\/span><span class=\"st\">&#39;dprt\/shortcode-button&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"kw\">array<\/span><span class=\"ot\">(<\/span><\/span>\n<span id=\"cb23-3\"><a href=\"#cb23-3\" aria-hidden=\"true\"><\/a>        <span class=\"st\">&#39;render_callback&#39;<\/span> =&gt; <span class=\"st\">&#39;dprt_button_shortcode&#39;<\/span><span class=\"ot\">,<\/span><\/span>\n<span id=\"cb23-4\"><a href=\"#cb23-4\" aria-hidden=\"true\"><\/a>    <span class=\"ot\">));<\/span><\/span>\n<span id=\"cb23-5\"><a href=\"#cb23-5\" aria-hidden=\"true\"><\/a>}<\/span>\n<span id=\"cb23-6\"><a href=\"#cb23-6\" aria-hidden=\"true\"><\/a>add_action<span class=\"ot\">(<\/span><span class=\"st\">&#39;init&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;dprt_register_shortcode_block&#39;<\/span><span class=\"ot\">);<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"testing-shortcodes\">Testing Shortcodes<\/h2>\n<p><strong>Test in Widgets<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb24\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb24-1\"><a href=\"#cb24-1\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Enable shortcodes in widgets<\/span><\/span>\n<span id=\"cb24-2\"><a href=\"#cb24-2\" aria-hidden=\"true\"><\/a>add_filter<span class=\"ot\">(<\/span><span class=\"st\">&#39;widget_text&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;do_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span><\/code><\/pre>\n<\/div>\n<p><strong>Test in Excerpts<\/strong>:<\/p>\n<div class=\"sourceCode\" id=\"cb25\">\n<pre class=\"sourceCode php\"><code class=\"sourceCode php\"><span id=\"cb25-1\"><a href=\"#cb25-1\" aria-hidden=\"true\"><\/a><span class=\"co\">\/\/ Enable shortcodes in excerpts<\/span><\/span>\n<span id=\"cb25-2\"><a href=\"#cb25-2\" aria-hidden=\"true\"><\/a>add_filter<span class=\"ot\">(<\/span><span class=\"st\">&#39;the_excerpt&#39;<\/span><span class=\"ot\">,<\/span> <span class=\"st\">&#39;do_shortcode&#39;<\/span><span class=\"ot\">);<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>WordPress shortcodes create powerful, reusable content elements through simple bracket syntax. Build shortcodes with attributes using shortcode_atts(), handle enclosed content via $content parameter, sanitize all inputs with esc_url() and esc_html(), return output instead of echoing, and reset post data after custom queries. Shortcodes empower non-technical users to add sophisticated functionality while maintaining clean, maintainable code architecture.<\/p>\n<h2 id=\"external-links\">External Links<\/h2>\n<ol type=\"1\">\n<li><a href=\"https:\/\/developer.wordpress.org\/plugins\/shortcodes\/\">WordPress Shortcode API<\/a><\/li>\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_shortcode\/\">add_shortcode() Reference<\/a><\/li>\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/shortcode_atts\/\">shortcode_atts() Reference<\/a><\/li>\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/do_shortcode\/\">do_shortcode() Reference<\/a><\/li>\n<li><a href=\"https:\/\/codex.wordpress.org\/Shortcode_API#Best_Practices\">Shortcode Best Practices<\/a><\/li>\n<\/ol>\n<h2 id=\"call-to-action\">Call to Action<\/h2>\n<p>Shortcode implementations need protection. <a href=\"https:\/\/backupcopilotplugin.com\/\">Backup Copilot Pro<\/a> safeguards your custom WordPress code and configurations. Protect your shortcode library\u2014start your free 30-day trial today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress shortcodes transform complex functionality into simple, reusable snippets insertable anywhere via bracket syntax. From buttons and galleries to dynamic content and API integrations, shortcodes empower non-technical users to add&#8230;<\/p>\n","protected":false},"author":1,"featured_media":291,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[736,737,735,738,734],"class_list":["post-194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-tips-tricks-hacks","tag-custom-shortcodes","tag-reusable-content","tag-shortcode-api","tag-wordpress-functions","tag-wordpress-shortcodes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress Shortcode Tutorial: Complete Guide 2025<\/title>\n<meta name=\"description\" content=\"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Shortcode Tutorial: Complete Guide 2025\" \/>\n<meta property=\"og:description\" content=\"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\" \/>\n<meta property=\"og:site_name\" content=\"Developry Plugins\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-15T09:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-24T11:18:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Krasen Slavov\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Krasen Slavov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\"},\"author\":{\"name\":\"Krasen Slavov\",\"@id\":\"https:\/\/developryplugins.com\/#\/schema\/person\/0530536578f952020ae227beb06a8daa\"},\"headline\":\"WordPress Shortcode Tutorial: Create Powerful Reusable Content\",\"datePublished\":\"2025-10-15T09:00:00+00:00\",\"dateModified\":\"2025-11-24T11:18:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\"},\"wordCount\":317,\"publisher\":{\"@id\":\"https:\/\/developryplugins.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png\",\"keywords\":[\"custom shortcodes\",\"reusable content\",\"shortcode api\",\"wordpress functions\",\"wordpress shortcodes\"],\"articleSection\":[\"WordPress Tips Tricks &amp; Hacks\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\",\"url\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\",\"name\":\"WordPress Shortcode Tutorial: Complete Guide 2025\",\"isPartOf\":{\"@id\":\"https:\/\/developryplugins.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png\",\"datePublished\":\"2025-10-15T09:00:00+00:00\",\"dateModified\":\"2025-11-24T11:18:22+00:00\",\"description\":\"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.\",\"breadcrumb\":{\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage\",\"url\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png\",\"contentUrl\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png\",\"width\":1200,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developryplugins.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Shortcode Tutorial: Create Powerful Reusable Content\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developryplugins.com\/#website\",\"url\":\"https:\/\/developryplugins.com\/\",\"name\":\"Developry Plugins\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/developryplugins.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developryplugins.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/developryplugins.com\/#organization\",\"name\":\"Developry Plugins\",\"url\":\"https:\/\/developryplugins.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/developryplugins.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/logo-black.png\",\"contentUrl\":\"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/logo-black.png\",\"width\":481,\"height\":107,\"caption\":\"Developry Plugins\"},\"image\":{\"@id\":\"https:\/\/developryplugins.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/developryplugins.com\/#\/schema\/person\/0530536578f952020ae227beb06a8daa\",\"name\":\"Krasen Slavov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/developryplugins.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7f554a5fc7eb1b702429addccdcc3fca841a0ce02bd76b04d2725098fbf925b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7f554a5fc7eb1b702429addccdcc3fca841a0ce02bd76b04d2725098fbf925b9?s=96&d=mm&r=g\",\"caption\":\"Krasen Slavov\"},\"sameAs\":[\"https:\/\/developryplugins.com\"],\"url\":\"https:\/\/developryplugins.com\/author\/slavovkrasen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Shortcode Tutorial: Complete Guide 2025","description":"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.","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:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Shortcode Tutorial: Complete Guide 2025","og_description":"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.","og_url":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/","og_site_name":"Developry Plugins","article_published_time":"2025-10-15T09:00:00+00:00","article_modified_time":"2025-11-24T11:18:22+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png","type":"image\/png"}],"author":"Krasen Slavov","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Krasen Slavov","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#article","isPartOf":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/"},"author":{"name":"Krasen Slavov","@id":"https:\/\/developryplugins.com\/#\/schema\/person\/0530536578f952020ae227beb06a8daa"},"headline":"WordPress Shortcode Tutorial: Create Powerful Reusable Content","datePublished":"2025-10-15T09:00:00+00:00","dateModified":"2025-11-24T11:18:22+00:00","mainEntityOfPage":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/"},"wordCount":317,"publisher":{"@id":"https:\/\/developryplugins.com\/#organization"},"image":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage"},"thumbnailUrl":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png","keywords":["custom shortcodes","reusable content","shortcode api","wordpress functions","wordpress shortcodes"],"articleSection":["WordPress Tips Tricks &amp; Hacks"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/","url":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/","name":"WordPress Shortcode Tutorial: Complete Guide 2025","isPartOf":{"@id":"https:\/\/developryplugins.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage"},"image":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage"},"thumbnailUrl":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png","datePublished":"2025-10-15T09:00:00+00:00","dateModified":"2025-11-24T11:18:22+00:00","description":"Create custom WordPress shortcodes for reusable content. Complete tutorial with examples, parameters, nested shortcodes, and best practices.","breadcrumb":{"@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#primaryimage","url":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png","contentUrl":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/featured-194-1763932634.png","width":1200,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/developryplugins.com\/wordpress-shortcode-tutorial-create-powerful-reusable-content\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developryplugins.com\/"},{"@type":"ListItem","position":2,"name":"WordPress Shortcode Tutorial: Create Powerful Reusable Content"}]},{"@type":"WebSite","@id":"https:\/\/developryplugins.com\/#website","url":"https:\/\/developryplugins.com\/","name":"Developry Plugins","description":"","publisher":{"@id":"https:\/\/developryplugins.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developryplugins.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/developryplugins.com\/#organization","name":"Developry Plugins","url":"https:\/\/developryplugins.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/developryplugins.com\/#\/schema\/logo\/image\/","url":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/logo-black.png","contentUrl":"https:\/\/developryplugins.com\/wp-content\/uploads\/2025\/11\/logo-black.png","width":481,"height":107,"caption":"Developry Plugins"},"image":{"@id":"https:\/\/developryplugins.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/developryplugins.com\/#\/schema\/person\/0530536578f952020ae227beb06a8daa","name":"Krasen Slavov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/developryplugins.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7f554a5fc7eb1b702429addccdcc3fca841a0ce02bd76b04d2725098fbf925b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7f554a5fc7eb1b702429addccdcc3fca841a0ce02bd76b04d2725098fbf925b9?s=96&d=mm&r=g","caption":"Krasen Slavov"},"sameAs":["https:\/\/developryplugins.com"],"url":"https:\/\/developryplugins.com\/author\/slavovkrasen\/"}]}},"_links":{"self":[{"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":1,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":195,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/posts\/194\/revisions\/195"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/media\/291"}],"wp:attachment":[{"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developryplugins.com\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}