Skip to content

Instantly share code, notes, and snippets.

@terrytsang
Last active September 11, 2022 09:56
Show Gist options
  • Save terrytsang/e6cc57a231ca3fd55a5fb776ac7a927a to your computer and use it in GitHub Desktop.
Save terrytsang/e6cc57a231ca3fd55a5fb776ac7a927a to your computer and use it in GitHub Desktop.
Enable shortcode in text widgets
<?php
//add thsi code into your theme functions.php
//Enable shortcode in text widget
add_filter('widget_text', 'do_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment