<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WPWife &#187; shortcodes doesn&#8217;t work in wordpress sidebar widget</title>
	<atom:link href="http://www.wpwife.com/category/shortcodes-doesnt-work-in-wordpress-sidebar-widget/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpwife.com</link>
	<description>WPHelp: fix and optimise WP themes&#38;plugins</description>
	<lastBuildDate>Fri, 21 Nov 2025 12:00:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.38</generator>
	<item>
		<title>How to Use Shortcodes in your WordPress Sidebar Widgets</title>
		<link>http://www.wpwife.com/tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets</link>
		<comments>http://www.wpwife.com/tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets#comments</comments>
		<pubDate>Thu, 01 Mar 2018 11:20:59 +0000</pubDate>
		<dc:creator><![CDATA[Editorial Staff]]></dc:creator>
				<category><![CDATA[how to use shortcodes in yoru sidebar widgets]]></category>
		<category><![CDATA[shortcodes doesn't work in wordpress sidebar widget]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[using shortcodes in wordpress sidebar widgets]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=3686</guid>
		<description><![CDATA[
<p>Do you want to learn how to use shortcodes in your WordPress sidebar widgets? Shortcodes allow you to do add additional features in your WordPress post content and other areas of your website. In this article, we will show you how to use shortcodes in&#8230;&#160;<strong><a href="http://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/">Read More &#187;</a></strong></p>
<p>The post <a rel="nofollow" href="http://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/">How to Use Shortcodes in your WordPress Sidebar Widgets</a> appeared first on <a rel="nofollow" href="http://www.wpbeginner.com/">WPBeginner</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Do you want to learn how to use shortcodes in your WordPress sidebar widgets? Shortcodes allow you to do add additional features in your WordPress post content and other areas of your website. In this article, we will show you how to use shortcodes in your WordPress sidebar widgets. </p>
<p><img title="How to use shortcodes in WordPress sidebar widgets" src="http://cdn2.wpbeginner.com/wp-content/uploads/2018/01/shortcodesinwidgets.png" alt="How to use shortcodes in WordPress sidebar widgets" width="550" height="340" class="alignnone size-full wp-image-49850" /></p>
<h4>What Are Shortcodes?</h4>
<p><a href="http://www.wpbeginner.com/glossary/shortcodes/" title="What is Shortcode in WordPress?">Shortcodes</a> allow you to add dynamic items like <a href="http://www.wpbeginner.com/plugins/5-best-contact-form-plugins-for-wordpress-compared/" title="5 Best Contact Form Plugins for WordPress Compared">contact form</a>, <a href="http://www.wpbeginner.com/plugins/how-to-add-tables-in-wordpress-posts-and-pages-no-html-required/" title="How to Add Tables in WordPress Posts and Pages (No HTML Required)">tables</a>, and others inside your WordPress content area. </p>
<p>You can also use shortcodes in your widgets to add these dynamic items in your sidebars and other widget-ready area.</p>
<p>Let&#8217;s take a look at how to easily add and use shortcodes in your WordPress sidebar widgets. </p>
<h4>Method 1: Adding Shortcode in WordPress Sidebar Using Text Widget</h4>
<p>First thing you need to do is drag &#038; drop a Text widget to your WordPress sidebar on the <strong>Appearance &raquo; Widgets</strong> screen in your dashboard. After adding the widget, you can simply add your shortcode inside the text edit area of the widget. </p>
<p><img title="Adding shortcode in Text widget" src="http://cdn2.wpbeginner.com/wp-content/uploads/2018/01/textwidgetshortcode.png" alt="Adding shortcode in Text widget" width="550" height="331" class="alignnone size-full wp-image-49845" /></p>
<p>Don&#8217;t forget to click on the &#8216;Save&#8217; button to store your widget settings. </p>
<p>You can now visit your website and see the shortcode in action. </p>
<p><img title="Shortcode displayed in sidebar widget" src="http://cdn4.wpbeginner.com/wp-content/uploads/2018/01/shortcodeoutput.png" alt="Shortcode displayed in sidebar widget" width="550" height="298" class="alignnone size-full wp-image-49846" /></p>
<h4>Method 2: Adding Shortcode in WordPress Using Custom HTML Widget</h4>
<p>Sometimes you may want to add custom HTML code around your shortcode which may not work so well in the plain text widget. In that case, you will need to add your shortcode using the &#8216;Custom HTML&#8217; widget. </p>
<p>By default, shortcodes are not allowed to be executed in a custom HTML widget. To change this, you will need to add the following code to your theme&#8217;s <a href="http://www.wpbeginner.com/glossary/functions-php/" title="What is functions.php File in WordPress?">functions.php</a> file or a <a href="http://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/" title="What, Why, and How-To’s of Creating a Site-Specific WordPress Plugin">site-specific plugin</a>. </p>
<pre class="brush: php; title: ; notranslate">
add_filter( 'widget_text', 'do_shortcode' );
</pre>
<p>After that, you can simply add a &#8216;Custom HTML&#8217; widget to your sidebar and add your shortcode inside it. </p>
<p><img title="Adding shortcode inside Custom HTML widget in WordPress" src="http://cdn3.wpbeginner.com/wp-content/uploads/2018/01/customhtmlwidget.png" alt="Adding shortcode inside Custom HTML widget in WordPress" width="550" height="310" class="alignnone size-full wp-image-49847" /></p>
<p>Don&#8217;t forget to click on the save button to store your widget settings. </p>
<p>You can now visit your website to see your shortcode in action. </p>
<p><img title="Shortcode added by Custom HTML widget" src="http://cdn2.wpbeginner.com/wp-content/uploads/2018/01/shortcodecustomhtml.png" alt="Shortcode added by Custom HTML widget" width="550" height="300" class="alignnone size-full wp-image-49848" /></p>
<p>We hope this article helped you learn how to easily add shortcode to your WordPress sidebar widgets. You may also want to see these  <a href="http://www.wpbeginner.com/beginners-guide/7-essential-tips-for-using-shortcodes-in-wordpress/" title="7 Essential Tips for Using Shortcodes in WordPress">essential tips for using shortcodes in WordPress</a>. </p>
<p>If you liked this article, then please subscribe to our <a href="http://youtube.com/wpbeginner?sub_confirmation=1" title="WPBeginner on YouTube"  rel="nofollow">YouTube Channel</a> for WordPress video tutorials. You can also find us on <a href="http://twitter.com/wpbeginner" title="WPBeginner on Twitter"  rel="nofollow">Twitter</a> and <a href="https://www.facebook.com/wpbeginner" title="WPBeginner on Facebook"  rel="nofollow">Facebook</a>.</p>
<p>The post <a rel="nofollow" href="http://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/">How to Use Shortcodes in your WordPress Sidebar Widgets</a> appeared first on <a rel="nofollow" href="http://www.wpbeginner.com/">WPBeginner</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpwife.com/tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="0" type="" />
		</item>
	</channel>
</rss>
