Last active
December 20, 2015 08:09
-
-
Save ovizii/6098024 to your computer and use it in GitHub Desktop.
Enable shortcodes in widgets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Enable for widget title | |
| add_filter('widget_title', 'do_shortcode'); | |
| // Enable for widget text | |
| add_filter('widget_text', 'do_shortcode'); | |
| // don't auto-wrap shortcode that appears on a line of it's own | |
| add_filter( 'widget_text', 'shortcode_unautop'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment