2 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 1+ items on Envato Market
JazzCake says

Hello ThemeProvince,

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 :)

119 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in an Envato Bundle
+8 more
valendesigns Envato team says

@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' );
2 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 1+ items on Envato Market
JazzCake says

@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 :D! 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.

119 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in an Envato Bundle
+8 more
valendesigns Envato team says

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!

Helpful Information

  • 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.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by