Using SMOF the smart way

I am rather ecstatic to see the number of interests people had with SMOF, and the growing number of themes already successfully porting it into their themes. It just feels great to see my work benefiting other people.

Anyway, the reason I am writing this post is to raise my concern over a few matters regarding the usage & modifications of SMOF. If you’re planning to use SMOF in your themes, and plan to continue updating it as more features & bug fixes come along in the future then you should definitely read this.

[sub]First and foremost[/sub]

Please only use the latest version on Github

There have been numerous bug fixes and added features since the first release of SMOF (currently at v1.3). If you’re using an older version of SMOF, please update your files to the current one, or I will not be able to help you. There’s been a few people using an older version complaining about bugs & errors which have already been fixed.

I wish I have all the time in the world to go review which line of code that was changed that fixed those bugs – but I sincerely do not. If you’re using an older version of SMOF and want to stick with that, then you’re on your own buddy. I’m truly sorry..

Do not edit anything else other than theme-options.php and admin-functions.php

Unless you have your own versioning system setup on your local station then it’s a bad idea to edit files other than mentioned above. If you have a feature that you seriously think is beneficial to be added to the framework, then please let me know so I can consider adding it. Otherwise, please consider the amount of time it would take you to update the files every time I do small changes to them.

I admit that I haven’t been quite systematically logging line-by-line code changes, making it slightly inconvenient for you to reflect the changes on your own files. However, this is only due to the fact that I want to save you from all the troubles of doing exactly that. The upgrading process should be easy for you – just swap in everything else other your theme-options.php and admin-functions.php.

I can understand though that some people are just coding ninjas. In this case, I certainly have no objection if you still want to customize the files really, but please do that at your own risk.

Check out the Issues page regularly

Sometimes I posted up small but relatively important notes about bug fixes etc. You should check them out from time to time just so that you are more well-informed about it.

Additionally, if you’re a new user just beginning to implement SMOF into your themes, then it would pay you off by reading some of the threads in there. There’s a very good chance that most of the issues that you would likely to encounter has been discussed in there.

[sub]Everything else[/sub]

A free SMOF’s ported theme

I understand the major importance of supplying SMOF with an actually working theme so that people can have a working example of how to use SMOF. This is still a work in progress & honestly I have no idea when it will be finished. But only to share a few details:

  • It will be HTML5 and responsive
  • SMOF will have a major rewrite, and the files will be distributed into smaller, more manageable chunks. The code structure will obviously be a little different of course but I can safely assure that nothing much will be changed inside theme-options.php
  • It will have the options.css method implemented, with multisite support.
  • I’m currently working on a “template-builder” framework, which is separate from SMOF
  • Some custom widgets
  • Shortcode buttons framework, based off the WooThemes’s Shortcode Ninja plugin
  • And possibly a different name

That’s a lot to promise, I know. But I just want you to know that I’m working really hard in the background to bring this to you, so stay tuned. Ultimately, I wanted to create a modern theme framework that people can use as a starting point to develop their own themes in the future.


I appreciate your generosity but I have no use for your money at the moment. If you’re adamant about giving away a few bucks anyway, then I would strongly recommend you to spend it on one of my favorite charities, the World Food Programme’s “Fill the Cup” programme. I will be forever thankful. :)

Alternatively, you can also send it to Devin Says himself, the guy who created the original Options Framework which SMOF is based on.

That’s all for now folks. I hope you enjoy using SMOF and continue notifying me about bugs and improvements that will make it better. Happy theming!


Discussions — 31 Responses

  • elen February 19, 2012 on 6:01 pm

    Hey syamil, just to say thanks for all your work with your framework :)

  • Wes February 20, 2012 on 7:16 pm

    This project roadmap has nothing but great things. Keep it up dude!

  • Mike March 23, 2012 on 1:42 am

    Hey! I’ve built about 4 or 5 websites using SMOF… Thanks for all of the time you put into it!

  • KSmith April 14, 2012 on 6:26 am

    Thank you so much for your work on SMOF. It’s amazing. Just what I was looking for, and more, really. The slider functionality is very nice.

  • flickapix May 15, 2012 on 2:44 pm

    fantastic work with smof, highly recommended. may i ask if you plan to release the shortcode buttons framework in the near future?

    • Syamil flickapix May 15, 2012 on 4:01 pm

      I saw a few open source shortcode generators out there, so I don’t want to re-invent the wheel unless I could really come up with something truly better. So far I haven’t truly tested any of them though (except for the shortcode ninja of course). Don’t hold your breath :)

      • flickapix Syamil May 24, 2012 on 8:01 pm

        its kinda what i’d thought lol, im currently working on integrating shortcode ninja into the framework im working on but drastically modded

  • Gregg May 15, 2012 on 5:52 pm

    Does SMOF have a WYSIWYG Type?

    • Syamil Gregg May 15, 2012 on 6:29 pm

      Not currently, but it will be included in the next update.

      • Gregg Syamil May 15, 2012 on 7:43 pm

        Thanks Syamil. Do you have a guess when that might be?

      • Syamil Syamil May 16, 2012 on 8:36 am

        End of this week is my target :)

  • hakan May 16, 2012 on 1:52 pm

    Hi Syamil,

    When I try to integrate your SMOF to my theme, javascript files do not load properly and because of that I see messed up options panel. I just uploaded admin folder to my theme directory and added

    * Slightly Modified Options Framework
    require_once (‘admin/index.php’);

    code to my functions.php file as you suggested. What else can you suggest?


  • KSmith May 22, 2012 on 2:01 pm

    Another file I’ve had to modify is ‘/admin/assets/css/admin-style.css’ to add some menu icons. I’d think that would be a pretty common thing people want to do with SMOF.

  • wmtimes July 15, 2012 on 5:06 am

    thanks,i begain to learn it

  • tonylabs August 29, 2012 on 4:02 am

    Hi Syamil,

    I’ve been using your SMOF for a while and it is really amazing.

    I would just like to know if your planning of creating a SMOF wordpress metaboxes version too?


  • Jesse March 14, 2013 on 6:12 pm

    Hi Syamil

    I’ve come a little stuck when using the options framework, Just wondered how I can integrate the google fonts option into a stylesheet etc?

    Also did you receive my email regarding the support forum?



    • syamilmj Jesse March 17, 2013 on 7:23 am

      Hey Jesse, just replied to your email :)


      • fahim syamilmj August 28, 2013 on 5:52 am

        Hi i am facing the problem related to function.php

        i am unable to get the values work in function. php

        for example

        g_font = $data[‘g_font’];

        but not work i also put the thread here

        but no buddy reply Please Reply as soon as possible it will be great help i am going to release a theme on themeforest and i would like to give back link to you

  • Pabagan March 20, 2013 on 10:12 am

    Hey Syamil!!

    First things first…thank you for your job. I started to use Devin’s framework then discovered the yours which is greeeeeeeeeeeeat.

    I am facing one problem (i am using de last SMOF version on github and last WP Version 3.5.1, without having modified any file). The problem is I am not able to print any option in header.php. If I try printing in any other page there is no problem: single.php, page.php…

    Do your know what could be wrong??

    Again thanks for your job and for your time, really apreciate it!!!

  • dilarang May 8, 2013 on 9:02 pm

    Helllo syamilmj,
    I was looking for hidden on/off switch on theme integration of SMOF, but haven’t got it here. Where can I find that? Anyway, you’ve built a great theme framework… thank you for your job

  • ZackLive August 13, 2013 on 7:21 am

    SMOF is a great work, really looking forward for the ported theme. Since this post is more than one year old, I’m kinda wondering how the progress is. Thank you very much for this amazing framework.

  • fahim August 28, 2013 on 5:55 am

    Hi i am facing the problem related to function.php

    i am unable to get the values work in function. php

    for example

    g_font = $data[‘g_font’];

    but not work i also put the thread here

    but no buddy reply Please Reply as soon as possible it will be great help i am going to release a theme on themeforest and i would like to give back link to you

    sorry for the previous comment position

  • Mohamed December 15, 2013 on 2:14 am

    Your product is very perfect, we used it but found error

    Warning: Illegal string offset ‘layout’ in E:\serv\wp\wp-content\themes\Ho\admin\classes\class.options_machine.php on line 116

    Please tell us why this happen and how can fix it?

  • Robin Islam March 13, 2014 on 9:06 am

    How can i add separated css on my smof framewok.

  • fahim March 13, 2014 on 9:43 am

    Hi I am themeforest author , my theme not approved because of the global variable $ data provided by the framework reviewer said should use the unique name of the variable please tell me how I do that ;)

    • ReadNue fahim March 15, 2014 on 12:44 pm


  • Nathz Ryuzaki March 13, 2014 on 8:37 pm

    why when I change the id at functions.options.php (i.e : “id” => “media_upload_35″,) become “id” => “logo_upload”, the code become error like this . the upload button is not show.

    • active-worker Nathz Ryuzaki April 5, 2014 on 7:38 am

      Got the solution. First of all need to click on “Options Reset” button. And after that it works! Hope it helps.

  • Kevin Steve March 14, 2014 on 3:52 pm

    Hi.. I have a problem adding new $of_options because when I try to add this code:

    $of_options[] = array(
    “name” => “Textarea”,
    “desc” => “Description here”,
    “id” => “new_textarea”,
    “std” => “”,
    “type” => “textarea”

    it is not added to the theme option and when I tried to use an existing “id”. It appeared.. what is happening on this? thank you :)

  • abdelrhman June 24, 2014 on 11:27 pm

    I need to control the categories from smof ?

    help me