Let's quick start it.
Open your current theme functions.php
file and paste this code.
// Control core classes for avoid errors if ( class_exists( 'CSF' ) ) { // // Set a unique slug-like ID $prefix = 'my_framework'; // // Create options CSF::createOptions( $prefix, array( 'menu_title' => 'My Framework', 'menu_slug' => 'my-framework', ) ); // // Create a section CSF::createSection( $prefix, array( 'title' => 'Tab Title 1', 'fields' => array( // // A text field array( 'id' => 'opt-text', 'type' => 'text', 'title' => 'Simple Text', ), ) ) ); CSF::createSection( $prefix, array( 'title' => 'Tab Title 2', 'fields' => array( array( 'id' => 'opt-textarea', 'type' => 'textarea', 'title' => 'Simple Textarea', ), ) ) ); }
How to get option value ?
$options = get_option( 'my_framework' ); // // unique id of the framework echo $options['opt-text']; // id of field echo $options['opt-textarea']; // id of field