Using Shortcodes in WordPress Widgets

If you, like most WordPress users, have a widget-enabled theme, you probably have wished you could use shortcodes in them at one time or another. Many plugins allow you to add functionality to your posts via shortcodes, but for some reason they are not enabled in text widgets.

Fortunately, there is an easy way to turn on the shortcode parsing in widgets. Chris Coyier, over at Digging into WordPress, dug up a filter hook you can add to your theme’s functions.php file.

You have to wonder, though…why isn’t this behavior the default?

Shortcodes in Widgets [Digging into WordPress]

  • web development company

    Hi guys, i’m using 3.0.1 and I havent managed to get this to work

    I inserted the code at the bottom of the functions file and the shortcode is still echoed out instead of the code it should be inducing.

    Any advice??