How To Add PHP To WordPress Widgets

One of the reasons I managed to setup my new WordPress theme so quickly was because I used WordPress widgets for the first time. I’d always assumed in the past that you would lose control by using widgets as they were aimed at ‘basic’ users, but I couldn’t have been more wrong as widgets allowed me to quickly build the new site up one widget at a time.

One drawback with WordPress widgets is that you can’t add PHP code inline to them, which meant that I couldn’t add plugins or call WordPress functions within widgets. That was until I discovered the Samsarin PHP Widget WordPress plugin that allows you to create new widgets that can include PHP code.

Once installed new Samsarin PHP Widgets can be created just like other widgets. Up to 25 PHP widgets can be created which should be enough for all bloggers.

More: Samsarin PHP Widget Plugin