By default, WordPress does not allow to add shortcodes in the widget. If you want to enable shortcode functionality for Widget then you need to allow shortcode for widget text. So let’s see how to enable shortcodes in WordPress widget. it’s too easy to allow shortcode in a widget. just follow below steps.

Enable Shortcodes in WordPress widget

Open functions.php  From of your current WordPress theme. Then add the below code at the end of the file.

Now add shortcodes as you want on the widget. The shortcodes are working on Widget.

If you face any issue after adding this code then please write the comment.