WordPress Smarty Plugin

I love smarty templates so much. We can write simple templates to complex templates very easy in smarty.

Simple Templates

{if $username}

Complex Templates

{foreach from=$arr_pfacility item=pfacility_text key=pfacility_id}
< tr >
{assign var="id_selected" value=false}
{foreach from=$smarty.post.fp_pfacility item=sel_item}
{if $sel_item==$pfacility_id}
{assign var="id_selected" value=true}
< td width="10" >
{if $id_selected}
< input type="checkbox" name="fp_pfacility&#91;&#93;" value="{$pfacility_id}" checked >
< input type="checkbox" name="fp_pfacility&#91;&#93;" value="{$pfacility_id}" >
< /td >
< td >{$pfacility_text.name}< /td >
< /tr >

I am working on to load smarty as a plugin to wordpress. if someone interested in making the templates for their blog admin plugins they can do 😀

Download a sample implementation here

By Imthiaz

Programmer, SAAS, CMS & CRM framework designer, Love Linux & Apple products, Currently addicted to mobile development & working @bluebeetle


  1. well, this might not be intended to be understood by people, that dont know smarty (including myself)… but: would you mind explaining what the above post is telling?

    if someone interested in making the templates for their blog they can do

    isn’t that what wordpress offers already? just wondering…

    something else: if you haven’t heard of “lightpress” already… now you know about it 😉 as far as i know its frontend is also based upon smarty – but i could be wrong… take a look at its beta… might be interesting or challenging for you as a programmer. would be cool if more programmers join the dev-team there to make it more stable and comfortable so more people would switch to for everyday-use in their blogs (im just a designer, thus cant make it what it should be) regards.

  2. EriK

    I know the lighpress. I was not taking about the general templates. Worpress is so powerful and you might not know how excellent cms it is. You can use the software not only for your blog. For so many other things.

    You can do wonders with your post meta and templates. You can design each category etc etc. This is all known stuffs. I wanted to write a plugin which can be used by other plugins. Suppose when a user makes a comment you can write plugin to thank him. For the thanking letter you need a template. You can use my template manager to create a template and save it in some name. And use your plugin to apply values on the template and send the mail using wordpress mail function.

    That is my next plan.. I need to have somemore time. Yeah I accept I am lazy too 😉

  3. Imthiaz what happened to your Smarty development
    Is it completed ! I’m really curious to now about it. You can mail me about it 🙂

    I want to run wordpress with smarty

  4. This is a very interesting idea to use the Smarty framework in WordPress!!

    I wonder what is the effect on WordPress’s performance.

Comments are closed.