Top

Daily Tip: How to Use Shortcodes in WordPress Text Widgets

August 1, 2011

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:

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.

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.