WordPress Development With Titan Framework - Kvcodes
X

Congrats, You are Subscribed to Receive Updates.

WordPress Development With Titan Framework


A Really helpful plugin for WordPress developers,  It reduces your Production time. When i come to read the titan framework, I felt , its just like  another useless, But when I started Using it, I just loved the way of it working. Even I didn’t believe that I use  the plugin for my Plugins and Projects With WordPress.  It have several functions, Here I just list certain things for your Reference. It Helps to create a admin pages, options, meta boxes, and theme customizer options with just a few simple lines of code. If you want to read its Official Doc read here.

titan

And Titan framework helps to reduce your Production time with efficient results. Here I just explain you, how to create a simple admin Panel With Tabs.

First , Just download the titan Framework from  WordPress Plugins directory or Github. Than just install the Plugin and activate it. Now we begin writing our theme with Titan Plugin.

First we have to create an object from titan framework.  so open your theme ” functions.php” file and create object in it.

	
$kv_titan = TitanFramework::getInstance( 'kv_demo_theme' );

Now, we create Admin Panel with Help of the kv_titan object.

$kv_adminPanel = $kv_titan->createAdminPanel( array(
    'name' => 'KV Admin Panel',
) );

Than , we are going to create tabs inside the admin panel with the following function.

$firstTab = $kv_adminPanel->createTab( array(
    'name' => 'First Tab',
) );

$secondTab = $kv_adminPanel->createTab( array(
    'name' => 'Second Tab',
) );

.
.
.

Here I just declared two tabs , But you can create many tabs with it.

and now, create options below the tabs.

$firstTab->createOption( array(
    'name' => 'KV first Option',
    'id' => 'kv_first_option',
    'type' => 'text',
    'desc' => 'This is our option'
) );

// drop down list

$firstTab->createOption( array(
    'name' => 'KV Select Option',
    'id' => 'kv_select_option',
    'type' => 'select',
    'options' => array(
        '1' => 'Option one',
        '2' => 'Option two',
        '3' => 'Option three',
    ),
    'desc' => 'This is a select drop down box',
    'default' => '2',
) );

$secondTab->createOption( array(
    'name' => 'KV Second Option',
    'id' => 'kv_second_option',
    'type' => 'text',
    'desc' => 'This is our option'
) );

We have created two options in the first tab and one option in the second tab. We need to save the data changes with retrieving the value of the options.

$firstTab->createOption( array(
    'type' => 'save'
) );

$secondTab->createOption( array(
    'type' => 'save'
) );

We just created the save option button for first and second tabs. Now  we are going to retrieve the value from the form and save it to the options table.

function kv_save_thme_setting_data() {

$kvTextOption = $kv_titan->getOption( 'kv_first_option' );
$kvSelectOption = $kv_titan->getOption( 'kv_select_option' );
$kvSecondOption = $kv_titan->getOption( 'kv_second_option' );

}

add_action('wp_head' , 'kv_save_thme_setting_data' );

Thats it for saving of your form data.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, OpenCart Theme Development, PHP, HTML, CSS, jQuery, Bootstrap development and content SEO.

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar

Subscribe E-mail Updates

Congrats, You are Subscribed to Receive Updates.

Advertisement

Category Posts