Use Shortcodes in WordPress Widget without Plugins

You can add this to your function to enable your short code in widget without pain.
[php]
add_filter( ‘widget_text’, ‘shortcode_unautop’);
add_filter( ‘widget_text’, ‘do_shortcode’);
[/php]

Tags:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.