Created
April 17, 2014 04:44
-
-
Save jentanbernardus/10953411 to your computer and use it in GitHub Desktop.
Quick WordPress Tip: Enabling shortcodes in widgets. Source: https://dannyvankooten.com/630/enabling-shortcodes-in-widgets-quick-wordpress-tip/
This file contains 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
<!-- To ensure that the output of our shortcode callback is not wrapped in paragraph tags, it is best to run one more function on the widget text, ‘shortcode_unautop‘. --> | |
add_filter( 'widget_text', 'shortcode_unautop'); | |
add_filter( 'widget_text', 'do_shortcode', 11); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment