How do I allow shortcodes to be executed in a WordPress widget?

It comes in handy — to be able to use those dynamic and very useful shortcodes in more places.  I’m sure the developers of WordPress have a reason to make developers have to put this extra line in the active theme’s function.php file, so here it is.  Yes, it’s that simple!


add_filter('widget_text', 'do_shortcode');

Leave a Reply 0

Your email address will not be published. Required fields are marked *