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

Bookmark & Share

Related Posts

About the Author

author photo

Everton is based in London and has worked in the internet and mobile space for over ten years now, and before that worked in corporate strategy and consulting. He has a degree in Economics from Cambridge University, and currently runs the Portal and online operations for one of the largest ISPs in the UK. He also writes for Windows 7 News.

See All Posts by This Author

There Are 3 Responses So Far. »

  1. #1

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

  2. #2

    [...] Samsarin PHP Widget v1.3.2 by Chris Pettitt — Allow PHP to be added to WordPress Widgets [...]

  3. #3

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

Subscribe without commenting

Post a Response


Comment Policy: Any comments are permitted only because the site owner is letting you post, and any comments could be removed for any reason at the absolute discretion of the site owner.
  • Subscribe Now!

    subscribe to my feed subscribe to my feed
    1 - What is RSS?
    2 - Or, signup & receive updates by email!
  • www.checkcost.co.uk

    Read Reviews & Compare

    Computer

    Laptops

    Printer

    MP3 Players

    Compare Prices

  • Polls

    Which Mobile OS Will Be The Winner in 2009?






    View Results

    Loading ... Loading ...
  • RSS Windows 7 News

    • An error has occurred; the feed is probably down. Try again later.
  • Meta