To enable shortcodes in text widgets add a filter like that:
add_filter( 'widget_text', 'do_shortcode' );
You can pass every string to do_shortcode()
including get_theme_mod()
calls.
echo do_shortcode( get_theme_mod( 'theme_setting' ) );
To enable shortcodes in text widgets add a filter like that:
add_filter( 'widget_text', 'do_shortcode' );
You can pass every string to do_shortcode()
including get_theme_mod()
calls.
echo do_shortcode( get_theme_mod( 'theme_setting' ) );