Using shortcodes in WordPress widgets


Recently needed to use a shortcode in a text widget, unfortunately the text widget doesn’t parse shortcodes. So I found a plugin that was basically the text widget but also parses shortcodes. Then I figured there must be a way to use hooks to accomplish this so I don’t need the extra plugin. There is. Just add this to your functions file and you can use shortcodes in widgets and widget titles.