Using SMOF the smart way

Posted by Syamil on February 17th, 2012 in wordpress 3 Comments

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. Continue reading “Using SMOF the smart way” »

SMOF Documentation

Posted by Syamil on November 19th, 2011 in wordpress 16 Comments
spacer

This documentation will serve as a starting point for you to setup SMOF and will be updated from time to time as the SMOF is further developed in the future. Ultimately, I will probably just dedicate a full page documentation on this site, and include a downloadable HTML copy of it on Github. Enough talking, let’s get started. Continue reading “SMOF Documentation” »

Dynamically generate static CSS files using php

Posted by Syamil on November 15th, 2011 in wordpress 39 Comments

If you are a premium theme developer, there may be times when you will need to generate dynamic css/js files to be used inside your theme. An example to this is when you want the users to be able to change certain aspects of the CSS including colors, backgrounds, padding, borders etc, or add their own css classes/id’s.

Introduction

There are a few popular approaches that theme developers used, including directly inserting the css code inside header.php, or call it from a style.php file. Most of these approaches have been explained by Ivan on The best way to create dynamic CSS for your WP theme.

But these approaches have problems of its own. For example, inserting css directly skips the wp_enqueue_style and still adding a few PHP calls to the header everytime the page loads; or using style.php would not only adding more PHP calls, but also require the server to load WordPress twice which is a no-no according to Otto – Donโ€™t include wp-load, please. Worse of all, none of these methods provide an ideal environment for cache plugins like W3 Total Cache. Ultimately, nothing beats the old school way which is a static css (e.g. styles.css) which is then enqueued inside functions.php – and that’s the direction I’m going with this tutorial.
Continue reading “Dynamically generate static CSS files using php” »

Slightly Modded Options Framework

Posted by Syamil on September 29th, 2011 in wordpress 90 Comments

Slighty Modded Options Framework or SMOF is an Options Framework for WordPress theme developers. It was heavily built on helgatheviking’s KIA Options Framework, which was forked from the original Options Framework by Devin Price. Some of the ideas and aesthetics improvements were borrowed from the Options Tree.

The main objective of the SMOF is to offer modern-looking, features rich Options Framework for theme developers.
 

Features:
  • Drag & Drop Slider (slider)
  • Layout Manager (sorter)
  • Background Patterns (tiles)
  • New Clean & Customized Interface
  • Media Library Uploader ( not really a feature, but it was added anyway, soo… )
Future Plans:
  • Simple Backup & Restore (backup)
  • Sanitization!

Continue reading “Slightly Modded Options Framework” »

Option Tree Multiple Checkbox

Posted by Syamil on August 27th, 2011 in Uncategorized 2 Comments

Using the multi-checkbox options in Option Tree.

OK, let’s start with the basics. Checkbox basically used to turn on/off stuff. If you have an option called “Test Option”, and given it id “test_option”, with the only option “on”, then you’d want to check if this option is checked or not.

The simplest way to do that is by using the following code:

if (get_option_tree( 'test_option', '', false ) == 'on')

Continue reading “Option Tree Multiple Checkbox” »

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.