438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
Pixelous says


valendesigns, one more question. In case of Step 1: Include the plugin & turn on theme mode, should I still wrap my code with function_exists? Thanks.
If you’re including it in your theme you do not need to use function_exists.

Ok, thanks for your answer.

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



valendesigns, sorry I am bothering u with all these questions, why not just make image width and height as a default feature in your plugin? Thanks.

It’s OK you’re asking questions I don’t mind. As far as my opinion on your feature request, you might be making assumptions that everyone needs to know the image height and width. OptionTree wasn’t created to do everything for you it’s meant to be extendable. You can always create your own custom option types if you need niche options and hook into the validation filter to keep them clean in the DB.

Quick question though, why do you need the height and width, why is that important to you?
At first these attributes speed up the rendering of the page and for the second I need my logo to be aligned center :)

You can center align it with CSS . I believe this will do the trick.

.your-image-class {
  display: block;
  margin: 0 auto;
}
438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
Pixelous says




valendesigns, sorry I am bothering u with all these questions, why not just make image width and height as a default feature in your plugin? Thanks.

It’s OK you’re asking questions I don’t mind. As far as my opinion on your feature request, you might be making assumptions that everyone needs to know the image height and width. OptionTree wasn’t created to do everything for you it’s meant to be extendable. You can always create your own custom option types if you need niche options and hook into the validation filter to keep them clean in the DB.

Quick question though, why do you need the height and width, why is that important to you?
At first these attributes speed up the rendering of the page and for the second I need my logo to be aligned center :)

You can center align it with CSS . I believe this will do the trick.

.your-image-class {
  display: block;
  margin: 0 auto;
}

I know, but in this case I need my image width, actually. Without it this will not work, really.

1081 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
  • Has been part of the Envato Community for over 6 years
+9 more
damojo says

I’m currently also in the process of finding a way to update my themes. I’ve been trying to use this guide http://snippi.com/s/9pa94k0 (thanks guys!) but there is a problem:

Once I upgrade to option-tree 2.0.6 on an existing theme install with all options populated, I recieve an empty theme options panel with only one option named “s”. In the export tab I get a serialized settings string, but importing that yields the same result: empty options… Also the import of my old option-tree.xml files doesn’t work for me.

Im not sure what to do, I have been testing for hours now. Any idea what might be going wrong Derek? If this fail I guess I have to integrate 1.1.8.1 into my themes so users don’t blow up their themes…

Any help is appreciated!

Moritz

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
Pixelous says

valendesigns, I work with Option tree as a Theme Mode: Step 1. Have hiden the settings & documentation pages:

/**
 * Optional: set 'ot_show_pages' filter to false.
 * This will hide the settings & documentation pages.
 */
add_filter( 'ot_show_pages', '__return_false' );

Don’t understand now how a buyer will import my Settings, it’s possible to make it activated with a theme install? Do u understand what I mean?

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

34 posts
  • Has referred 50+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CodeLion says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

Thanks ParkerAndKent! i’ll try this solution ASAP .

922 posts
  • Has referred 500+ members
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Has been a beta tester for an Envato feature
  • Has collected 500+ items on Envato Market
+13 more
MDNW says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

You are a gentleman and a saint P&K ;) Well done! Brandon

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

Hey Guys,

I’m working on a way to export the theme options to a PHP file, should be available early this coming week. It’s a bit more than just a var_export() as I want it to include the add_action() and build a complete file like the demo-theme-options.php but with your saved settings so all you need to do is include it. You should test it and check it for errors before you use though just to be safe.

Cheers, Derek

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi derek,

v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…

Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…

Parker

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