When should you use the Sortable Option & Example

There are some unique options in Titan Framework, one of them is Sortable Option. If you haven’t used it before, it looks like this: The sortable option is commonly used when you have a set of choices and you want to allow your users change the particular order and enable/disable each choice. It’s basically like having multiple checkboxes that you can rearrange. You can use the sortable option in scenarios such as: Galleries – if you want to allow your users can add/remove and rearrange the caption elements (title, excerpt, read more link). Page headings – users can add/remove and Continue reading →

How does Titan Framework make plugin and theme coding easier?

Many other frameworks claim to make coding easier, and Titan Framework is no exception. But what characteristics of a framework would comprise as “easy” in usage? To demonstrate this, let’s see the typical workflow of making WordPress options menus the classic way, and the Titan Framework way. Ordinary WordPress Way 1. Create function and hooks for menu making. 2. Write register_setting. 3. Write add_settings_section. 4. Write add_settings_field for every option needed and their needed functions. 5. Write the needed HTML code for those setting fields and options. 6. Write handlers for updating values for the options. 7. Style the options Continue reading →

The State of Titan Framework #1: RoadMap, Tutorials & Monetization

If you’ve visited the site before, you might have noticed the small banner for a short survey. This banner has been there for quite a few weeks now and we’ve gathered a lot of awesome feedback from the survey. Because of this we’ve decided to dedicate more time into Titan Framework and take a new direction. This direction will allow us to (finally) bring some much needed monetization, bring more tutorials for both veterans and newcomers, all the while still contributing back to the awesome WordPress community by giving away Titan Framework for free. We’ll make a future blog post about the Continue reading →

Build a Simple Theme with Customizer Options

Themes have a certain look to them. Most of the time, theme users would want to tweak certain aspects of the theme’s default design to better suit their needs. For example if your theme has a dark gray navigation bar, most likely there would be a number of users which would want to change this color into another one. If would be easier to just tell your users to just use the dark gray color and suck it up. But I don’t think they’ll be too happy about that. The better way would be to allow them to change it from Continue reading →

Building a Simple Plugin with Options

Titan Framework is built to make flexible and dynamic plugins easier to make. Instead of having to deal with the heavy lifting of writing options, functions and updating values, it takes and encapsulates them in a simple class call, array-based setting, and a class-based option value fetching. Titan Framework also handles menu page building for you! But like all things, you have to start somewhere. On one glance, it looks like an insurmountable mountain of complex sophistication, but peel back the surface and you’ll find out it’s not that hard to understand. Then again, where do you start? For this, Continue reading →

What’s new in Titan Framework 1.9

There are a lot of changes that comes with Titan Framework version 1.9, the largest change is in how it works and the by product of these are faster page loading times, and less intensive processing. The best part here is when you update, you won’t need to change anything in how you use Titan. Previously, under the hood Titan Framework performs a few things to initialize itself: Gather all the options created with createOption For admin options and customizer options, save all the default values in the database if they aren’t there yet. Cleanup the options, remove any unused ones, and add Continue reading →

tf_create_options

Version 1.5 >= Description Used to create all admin page, meta box and customizer options. All options should be created from within this action hook. Usage add_action( ‘tf_create_options’, ‘create_options’ ); ​ Parameters None Examples Create an admin page with a few options. function create_options() { // Initialize our instance $titan = TitanFramework::getInstance( ‘my-theme’ ); // Create an option $titan->createOption( array( ‘name’ => __( ‘Enable Plugin’, ‘default’ ), ‘type’ => ‘enable’, ‘id’ => ‘enable’ ) ); $titan->createOption( array( ‘type’ => ‘save’, ) ); } add_action( ‘tf_create_options’, ‘create_options’ );​

tf_done

Version 1.8 >= Description Called right after Titan Framework initializes. We recommend using this hook to gather your settings for class structures. (More in the examples below on this). Usage add_action( ‘tf_done’, ‘done’ ); ​ Parameters None Examples Gather options for usage in a class. You would basically want to do this if you are not embedding Titan Framework (which hopefully you aren’t) and you are using a class structure for your plugin/theme. You can have a class property to hold all your default settings, then let the tf_done action fill up the options for you then use that property Continue reading →