Enable Shortcodes In Widget Areas (WordPress)

Enable Shortcodes In Widget Areas (WordPress)

You know by default in WordPress you can’t use shortcodes in widget areas. Stupid, right? Why? Nobody knows. There has been speculation with some saying it’s the developers just trying to be awkward because they can’t have a pay rise. Luckily there is a simple solution! Simply open your functions.php file and add the following code at the bottom:

add_filter('widget_text', 'do_shortcode');

The Gods of WordPress will now look favorably upon you and grant you the use of shortcodes in your widget areas.

Happy Monday! : )

Share this post

Leave a Reply

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