In this code snippet we will share how to use shortcodes in WordPress widgets. If you want to use shortcodes in widgets, You need to add some line of code to theme’s functions.php file.

Add the following code to functions.php file:

/* Use shortcodes in widgets */
add_filter( 'widget_text', 'do_shortcode' );
How to Use Shortcodes in Widgets
5 (100%) 3 votes

(Visited 29 times, 1 visits today)

Leave a Comment

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