skip to Main Content

Enable Shortcodes in WordPress widget


WordPress by default does not allow to add shortcodes in the widget. So let’s see how to how to enable shortcode in WordPress widget. it’s too easy to allow shortcode in a widget. just follow below steps.

open functions.php  From your active theme. and add blow code for allow shortcode.

add_filter(‘widget_text’,’do_shortcode’);

Now you can a shortcode on widgets.

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

Saroj

I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

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

Back To Top