• Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact
Log In

  • Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact

HomeCodeHow to add new items to Theme Options
New options

How to add new items to Theme Options

  • admin
  • Posted in CodeJaW HooksTutorials
0
SHARES
SHARESHARESHARESHARE
SHARESHARE

In case of you want to add some options to Theme Options, you can use our filters in your Child Theme.

Simply add this code to your child theme’s function.php

function my_themeoptions_menu($menu){
     $menu['myoptions'] = array('submenu' => 0, 'name' => 'My Options', "icon" => "jaw-icon-king");
     return $menu;
}
//add section to left menu in Theme Options
add_filter('jaw_themeoptions_menu', 'my_themeoptions_menu',10,1);



function my_themeoptions($options){
    $options[] = array("name" => "My Options", 
    "type" => "headingstart");
    
    //option 
    $options[] = array(
    'id' => 'my_awesomeness',
    'type' => 'toggle',
    'name' => 'Awesomeness',
    'desc' => 'Turn the awesomeness ON',
    'std' => '0'
    );

    $options[] = array("type" => "headingend");
    
    return $options;
}
// add options to new section
add_filter('jaw_themeoptions', 'my_themeoptions',10,1);

Bear in mind these rules:
New options explanation

Result should looks like this:
New options2

Now you probably want to use your option on fronted. Please follow this tutorial.

Second part of this tutorial

Related Posts

wphooks
0 comments
JaW Hooks

Actions jaw_before_usermanagement and jaw_after_usermanagement

menu-widget6
0 comments
CodeTutorials

How to add more Widget areas to menu.

wphooks
0 comments
JaW Hooks

Filter jaw_get_template_part

proportion

Images have bad proportion after demo install

show2

How to add element to RevoComposer

Related Posts

wphooks
0 comments
JaW Hooks

Actions jaw_before_usermanagement and jaw_after_usermanagement

menu-widget6
0 comments
CodeTutorials

How to add more Widget areas to menu.

wphooks
0 comments
JaW Hooks

Filter jaw_get_template_part

install-t6
0 comments
Tutorials

How to set Custom Stock Ticker

Tags

  • filter
  • New Option
  • Option
  • theme options
  • Theme Settings
  • Was this Helpful ?
  • yes   no
Copyright © 2016 jawtemplates - WordPress Design Studio Disable responsivity