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:
In this example, I’m using ET Shortcodes plugin by Elegant Themes. Simply adding this shortcode to your text widget will not get the same result.
Want something more? Stephanie Leary has a very comprehensive article on enabling the shortcode on everywhere else.
Leave a Reply