1

I am developing a child theme based on a theme that use Option Tree for it's options.

Is it possible to add a new section with my child theme settings to the already defined sections by parent theme ?

The only reference I found was https://github.com/valendesigns/option-tree-theme/issues/3 but I couldn't implemented. I also read a lot the Option Tree code but couldn't find the appropriate filter.

1

For anyone who want to achieve the same thing :

add_filter( ot_settings_id() . '_args', 'my_ot_setting');

function my_ot_setting($custom_settings){

//do some work with the settings and the sections, ie append your settings.

return $custom_settings;
}

This works if the parent theme applies this filter before saving the options like the example here : https://github.com/valendesigns/option-tree-theme/blob/master/inc/theme-options.php#L833

Otherwise you have to do it yourself like the example above.

  • This is like hundred of years old , and OT its been maintained by other person , but I can't extend any function like you @Laxmana said 3 years ago – Locke Aug 2 '18 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.