Ever tried to paste the shortcode in the text widget and found out that it didn’t work?
By default, shortcodes don’t work with the text widget in WordPress.
You can easily enable shortcodes in the text widget with the ‘widget_text’ WordPress filter.
/**
* Enable Shortcode in Text Widget
*/
add_filter( 'widget_text', 'do_shortcode' );