In this very short tutorial, I’m going to share a little snippet to enable shortcodes in WordPress widgets. By default, all shortcodes can only be used in post and page post types.
To add shortcode support in widgets, simply paste the following code in the functions.php file of your child theme:
Here’s the result after you’ve added the code:
Want something more? Stephanie Leary has a very comprehensive article on enabling the shortcode on everywhere else.