How to enable Shortcodes in WordPress Widget Area. add the following line of code in your current theme’s function.php file. To check the functionality add your custom shortcode in a text widget.
<?php
// text widget runs shortcode
add_filter('widget_text', 'do_shortcode');
?>