We will have to edit functions.php file.
Add this below code functions.php file. (Code has been take from Atahualpa 3.5.3)
PHP Code:
function bfa_html_inserts($custom_code) {
global $bfa_ata;
if($custom_code != '') {
if ( strpos($custom_code,'<?php ') !== FALSE ) {
ob_start();
eval('?>'.$custom_code);
$custom_code = ob_get_contents();
ob_end_clean();
}
}
return $custom_code;
}
Edit function bfa_parse_widget_areas($content)
PHP Code:
function bfa_parse_widget_areas($content) {
if ( strpos($content,'<?php bfa_widget_area') !== FALSE ) {
$content = preg_replace_callback("|<\?php bfa_widget_area(.*)\((.*)'(.*?)'(.*)\)(.*)\?>|","bfa_parse_widget_areas_callback",$content);
}
$content=bfa_html_inserts($content); /******** ADD THIS LINE *************/
return $content;
}
Logic behind the changes
The extra added function evaluates PHP using the eval function.
I have added a call to that function from function bfa_parse_widget_areas because bfa_parse_widget_areas is used to create custom widget areas. So if you can create a custom widget area at a particular place then you will also be able to use PHP in that section.
Still you wont be able to use php in CSS Insert. But now you know how it is done so you can easily figure out how to even use PHP in CSS Insert. You are just require to call bfa_html_inserts function before returning the result