Posts

Showing posts with the label widget_customization

How to allow custom shortcodes in custom widgets or in widgets in wordpress

For allow shortcodes in widgets we need to add 2 filters for render shortcodes. 1). Add below filter for remove auto p tag for widget area.. So our shortcode output will not wrapped by p tag   add_filter( 'widget_text', 'shortcode_unautop');  2) .Below filter will allow widget text to rendor shortcode add_filter( 'widget_text', 'do_shortcode', 11);