In blog

Using the following code you can enable php in wordpress widget area without installing any plugins. This way you can custom your wordpress widget area to show PHP code In your theme folder, open function.php and add the following code [php] /** Enabling PHP On Widget area **/ 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; } [/php] Plugins normally slow your website down but if you prefer to use them you can search for “php widget wordpress” Read more on here

Recommended Posts