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.
I’m trying to hide some fields from a List, through jQuery. I’m checking for a “select” field from that List and based on it’s value i hide various fields. I’ve managed to do most of it, but i can’t select a textarea, because it doesn’t have a class applied to it. All the other fields that i’ve used(text & upload) have custom classes applied, but the textarea doesn’t have any class(even if i set one)..
Is this intentional or it is a bug? Or i’m not doing it right?Thanks for your help!
I’ll take a look at it and push it up in the next version.
Derek, let me also thank you very much for this plugin!
i have a question regarding the new OT version:
in v 1.8.1 you`ve removed get_option_tree() in the WordPress admin area due to theme conflicts.
can i use the new 2.0+ version in the Admin area, to add for example Header & Footer logos ? (and also maybe a custom login logo)thanks, andi
The get_option_tree() & ot_get_option() functions are both available in the admin area and front-end. However, use the ot_get_option() function instead as it’s the one that will be support in future versions, not to mention it’s a bit more flexible than the old one.
I answered your questions on Twitter but for the benefit of everyone here I’ll repeat it.
You asked about auto import and were experiencing some issues. Auto import works under the assumption you are upgrading from a 1.x to 2.0.8 and have not done any of the in between version as the ‘option_tree_settings’ already exists. Also, if you activate OT before activating your theme the default options will already be loaded and thus stop the auto import. We did chat about adding a force import button on the import page which I am looking into for those that need it after installing any of the 2.0 – 2.0.7 versions. That will be coming shortly. Otherwise, everything should be working well now and issues where it’s not auto imported are due to the above reasons.
Derek, take a look at this http://stackoverflow.com/questions/8547009/how-to-deserialize-this-string-into-a-php-array-of-key-value-pairs Hope this help, let me know, please.
Please create all feature request in the issue tracker here. https://github.com/valendesigns/option-tree/issues?page=1&state=open
Ok, Derek, if there is no way to load an array automatic I could start to fill in it manually then give to u, so, do u recomend to do so?
Let me have a think on it and try and figure out a good way to do it so it’s more elegant than adding it manually. I’ll get back to you soon, but for now I would suggest you create you’re own font stacks using the typography option type and using only the fonts you need for your theme.
Derek, it’s possible to make an array looks not like that like at Parker’s link:Array ( [font-family] => font-family: 'Abel', sans-serif; [font-name] => Abel [css-name] => Abel )
But it like that:Array ( 'Abel' => 'Abel', )Or do u suggest to fill in Google Fonts array manually?
No, changing the typography option is not on the table it would cause to many issues. If you want a google font option type we need to come up with a way to build the font stack so the output adds the proper google fonts and everything works properly.