Download for free Driver & pc suite fot your windows Computer

Monday, September 21, 2015

How to Use PHP Code in WordPress Widget Without Plugin

How to Use PHP Code in WordPress Widget Without Plugin - Hello visitor, Driver pc suite download free , In the article that you are reading in this time with the title How to Use PHP Code in WordPress Widget Without Plugin, we hope this article useful for your problem information. hopefully the contents of the post label How to, WordPress, what we write you can understand. all right, have a nice reading.

Tittle : How to Use PHP Code in WordPress Widget Without Plugin
Links : How to Use PHP Code in WordPress Widget Without Plugin

Also read :


How to Use PHP Code in WordPress Widget Without Plugin

Sometimes we need to put the PHP code into a WordPress widget but didn't work the code. Because WordPress does not allow to put the PHP code in the widget, but you can fix this issue with simple codes. If you want to use PHP code via a plugin, then a lot of plugins are available to provide this facility. But if you want to use PHP code without any plugin, then follow below steps.


Find your WordPress functions.php file and paste below lines:

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;
}

Save your functions.php file and put your PHP code into WordPress widget. It will work Fine.

Incoming Search Terms: 

execute php in widget, PHP in widget, use PHP in wordpress widget,PHP code for widget, execute php without plugin



Thanks for visit How to Use PHP Code in WordPress Widget Without Plugin

That's the article How to Use PHP Code in WordPress Widget Without Plugin in this time, hopefully it can be of benefit to all of you. well, see you in another article post.


You are now reading the article How to Use PHP Code in WordPress Widget Without Plugin with the link address https://driver-pcsuite-download.blogspot.com/2015/09/how-to-use-php-code-in-wordpress-widget.html
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : How to Use PHP Code in WordPress Widget Without Plugin

0 comments:

Post a Comment