Skip to content

WordPress: Shortcodes in Widgets

Can I use a [shortcode] in a text widget? Sure!

"Just add this to your functions.php file:

add_filter('widget_text', 'do_shortcode');

This will ensure that the text content of widgets is parsed for shortcodes and those shortcodes are ran. Awesome."

via Shortcodes in Widgets | Digging into WordPress.