
So, you want to use a shortcode, and you want to put it in a widget. You probably found out that the shortcode doesn’t process, but instead displays the shortcode text on the page. Lame, right?
Luckily there’s a really easy quick fix for this.
Simply add this code to your theme’s functions.php file
// Enable shortcodes in text widgets add_filter('widget_text', 'do_shortcode');
That’s it! Now your shortcode actually gets processed and displays what you intended to display.

Blogger, expert WordPress developer, and developer of the awesome bbPress Voting plugin which is a must-have plugin for any bbPress forum.
Download bbPress Voting for free on the WordPress Plugin Directory.