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.
Bookmark & Share
Related Posts
- Would You Use The WP-Backlinks WordPress Plugin?
- May 2008: WordPress Plugins Used On This Site
- What Do You Think Of The New WordPress Plugin Directory?
- WordPress Automatic Upgrade Plugin
- Top 30 WordPress Plugins
- WordPress Optimisation: Control When Plugins Are Loaded
- TypoXP Reloaded Theme Now Supports Widgets





Comment by Zath on 17 May 2008:
I’ve never used widgets, I just assumed they were for beginners and meant you lost functionality that coding gives you.
I’ll have to take a look at widgets!
Read Zath’s latest blog post….Wii Fit>>>
Pingback by May 2008: WordPress Plugins Used On This Site | Connected Internet on 17 May 2008:
[...] Samsarin PHP Widget v1.3.2 by Chris Pettitt — Allow PHP to be added to WordPress Widgets [...]
Comment by logo design blog on 29 August 2008:
I could be wrong, but i think exec-php plugin allows php to be used inside not just widgets, but also in posts and pages.
Read logo design blog’s latest blog post….New Orleans Hornets Refreshes Logo Design and Team Uniforms>>>