transmitstudio
5/10/2016 - 11:36 PM

Enable Shortcodes in Widgets

add_filter('widget_text', 'php_text', 99);
 
function php_text($text) {
 if (strpos($text, '<' . '?') !== false) {
 ob_start();
 eval('?' . '>' . $text);
 $text = ob_get_contents();
 ob_end_clean();
 }
 return $text;
}