You mentioned there is an index.php file inside option-tree folder. But I have downloaded recently there is no any index.php file. There is ot-loader.php file.
is that same file? if yes please confirm which lines have to replace.Thanks
Heey Umid! As of OptionTree 2, the index.php is indeed replaced with ot-loader.php.. Here’s what to do:
After placing the option-tree map inside your theme’s map, open your theme’s function.php, and use ThemeProvince’s code to connect with the ot-loader.php file, thus:
require TEMPLATEPATH . '/option-tree/ot-loader.php';
Then, open ot-loader.php, and around line 160 there’s a text that explains enabling OptionTree in theme mode. Right beneath the text you’ll find this code:
define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) );
Replace the “false” with “true”.
Aaaaand you’re done! I hope this helps anyone who got stuck since the newer versions
@JazzCake You’re partly correct. However, you would not edit the OptionTree core. You would add the following filter to your functions.php.
add_filter( 'ot_theme_mode', '__return_true' );
@valendesigns Thanks ! And great timing, because without that piece of code, my OptionTree would remain looking like a mess! I just wasted time on Google trying to find the solution to it.
Not a problem, glad to help. Most of the theme mode info can be found on the Documentation page when OT is activated – for future reference. Also, if you read the inline docs above each of those filters, found in ot-loader.php, you can do some interesting things to make OT work exactly the way you want. For example, creating a custom option page for a plugin or feature in your theme or even hiding parts of the settings page; amongst other things. Cheers!
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.