How to add PHP code to a Wordpress widget
December 04, 2008 | Glenn Haggard | Comments 2
It wasn’t until recently that I have ever had a need to put PHP code into a Wordpress widget. This was due to a plugin that I downloaded called Flashfader. This plugin provides the ability to put a Flash on your Wordpress blog that will rotate pictures. The only way to use this is with PHP code which doesn’t work in a Wordpress widget by default. In order to use PHP code in a widget you need the Executable PHP Widget.
How Executable PHP Widget works
This is a very simple plugin and installs just like any other plugin.
- Download the zip file and unzip.
- Upload the folder that it creates to the <webroot>/wp-content/plugins folder
- Login your Wordpress admin panel and enable the plugin
- Click Design, Widget, and drag the PHP Code: widget to your sidebar
- Insert the code into this widget and you’re done
Filed Under: Wordpress



thank you sooo much for this…i’ll be able to use this on my other site
Very good blog