Hi,
Am trying to enable php code in the text block and came across this code form my functions.php class but it doesnt seem to work in the Enfold theme, maybe the “widget_text” reference is incorrect? I know of plugins that will work but would prefer not to use.
add_filter('widget_text','execute_php',100);
function execute_php($html){
if(strpos($html,"<"."?php")!==false){
ob_start();
eval("?".">".$html);
$html=ob_get_contents();
ob_end_clean();
}
return $html;
}
Thanks,
Mick.