How to Use Shortcodes in WordPress Text Widgets

How to Use Shortcodes in WordPress Text Widgets

Quite awhile ago I shared a tip on using shortcodes outside of the post editor. Here’s another equally handy snippet for enabling shortcode use within WordPress text widgets.

Add this to your functions.php file:
{code type=php}
add_filter( ‘widget_text’, ‘shortcode_unautop’);
add_filter( ‘widget_text’, ‘do_shortcode’);

Source: using shortcodes everywhere

Now you’ll be able to use shortcodes within text widgets, just as you would within the post editor. Follow Stephanie Leary’s tutorial to add shortcodes virtually anywhere you want within WordPress.

Free Video Why 100 is NOT a Perfect Google PageSpeed Score (*5 Min Watch) Learn how to use Google PageSpeed Insights to set realistic goals, improve site speed, and why aiming for a perfect 100 is the WRONG goal.
Tags: