209 posts
  • Located in Canada
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
DanyDuchaine says

Awesome plugin, transition went smoothly.

I have a question, what is the best way to add default value so that when the user activate the theme, it automatically come packed with optiontree + my options + my default value for these options.

I’ve added the entire option-tree folder in the root of my theme, I’ve added the code to reference it in my functions.php, I’ve exported my theme-options.php file, I’ve added it in the theme and referenced it in my functions.php.

When testing on a fresh WP install, option tree is there, my options are there, but they are blank and I can’t access my layouts. So the user can’t choose a predefined sets of value for the options, and they can’t upload any layouts information .. the only way is to have them install the plugin so they can import some layouts data.

Is there a better way?

Thanks!

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
  • Located in Europe
+1 more
Pixelous says

DanyDuchaine, Derek have said:


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

As for default value, u can set it here http://snag.gy/BTmEe.jpg

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

Awesome plugin, transition went smoothly.

I have a question, what is the best way to add default value so that when the user activate the theme, it automatically come packed with optiontree + my options + my default value for these options.

I’ve added the entire option-tree folder in the root of my theme, I’ve added the code to reference it in my functions.php, I’ve exported my theme-options.php file, I’ve added it in the theme and referenced it in my functions.php.

When testing on a fresh WP install, option tree is there, my options are there, but they are blank and I can’t access my layouts. So the user can’t choose a predefined sets of value for the options, and they can’t upload any layouts information .. the only way is to have them install the plugin so they can import some layouts data.

Is there a better way?

Thanks!

When you have the plugin in Theme Mode and are hiding the settings & docs the best solution would be to create your own functions that load much like the theme-options.php does. You’ll want to do a check for the ‘option_tree’ & ‘option_tree_layouts’ options and if they don’t exist load your defaults.

I’m also open to suggestions if you can think of a better way to do it that can be coded in and make your life easier. It’s a community project so suggestion are always welcome.

Cheers, Derek

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

Is there a way to prepopulate list-item option, with list items which have different settings in them? :)

Are you referring to theme options or meta boxes?

209 posts
  • Located in Canada
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
DanyDuchaine says

Maybe add some options to turn on/off some area in theme mode, like layouts import for example. No idea how this would be done though.

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

Maybe add some options to turn on/off some area in theme mode, like layouts import for example. No idea how this would be done though.

That could get weird, but I’ll look into it.

209 posts
  • Located in Canada
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
DanyDuchaine says


Maybe add some options to turn on/off some area in theme mode, like layouts import for example. No idea how this would be done though.
That could get weird, but I’ll look into it.

Thanks .. Maybe an import button next to the input where the user can create new layout at the moment.

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



Maybe add some options to turn on/off some area in theme mode, like layouts import for example. No idea how this would be done though.
That could get weird, but I’ll look into it.
Thanks .. Maybe an import button next to the input where the user can create new layout at the moment.

That’s what I was thinking, as well. The issue is we have a lot of ways to use the plugin and we need to make both plugin and theme mode as easy to use as possible without conflicting with each other. I’m going to look into having an import only page but it may be to crazy to do without introducing bugs or a lot of confusion. However, import layouts works in plugin mode if the old 1.x files exist in the ‘option-tree’ directory in the themes root. So the old style of auto import works, but theme mode is where we need to come up with a good solution that works well for everyone.

332 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+3 more
dekciw says


Is there a way to prepopulate list-item option, with list items which have different settings in them? :)
Are you referring to theme options or meta boxes?

Theme options.

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



Is there a way to prepopulate list-item option, with list items which have different settings in them? :)
Are you referring to theme options or meta boxes?
Theme options.

Are you asking to have a list item inside another list item? If so, the answer is no, not at this time, sorry! If not, can you clarify the question.

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