Skip to content

Instantly share code, notes, and snippets.

@chrisdavidmiles
Created September 18, 2018 00:55
Show Gist options
  • Save chrisdavidmiles/b2408b79d5c2f4a4db04fbb224ffec5c to your computer and use it in GitHub Desktop.
Save chrisdavidmiles/b2408b79d5c2f4a4db04fbb224ffec5c to your computer and use it in GitHub Desktop.
A filter to enable shortcodes inside text widgets in WordPress
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment