Great thanks, infuse01! Don’t know why at front end I have not font names but just their numbers?
wp_register_style( $primary_typography['font-family'], 'http://fonts.googleapis.com/css?family='. $primary_typography['font-family'] );
$primary_typography[‘font-family’] should be Pacifico as I have chosen at select list from Options Tree theme options but it returns just number 406. Very strange…
Pixelous said
Great thanks, infuse01! Don’t know why at front end I have not font names but just their numbers?wp_register_style( $primary_typography['font-family'], 'http://fonts.googleapis.com/css?family='. $primary_typography['font-family'] );$primary_typography[‘font-family’] should be Pacifico as I have chosen at select list from Options Tree theme options but it returns just number 406. Very strange…
Honestly, I have no experience with using that array within OptionTree since I use my own panel. It seems to me like the 406 is the position of “Pacifico” in that array. But why it returns the no. instead of the value – can’t tell ya.
Sry 
But if anyone else has an idea I would be really interested in it.
Pixelous said
dekciw, have u done it? If so, could u explain more detailed how to make it? infuse01, could u share with your array please?
I’ve done that in Options Framework, not yet in OptionTree
But gonna do that soon.
dekciw said
Pixelous saidI’ve done that in Options Framework, not yet in OptionTree
dekciw, have u done it? If so, could u explain more detailed how to make it? infuse01, could u share with your array please?But gonna do that soon.
dekciw, could u then share with community here coz I couldn’t make it work, please?
Ok, using optiontree in theme-mode, cause some warnings and required stuff to popup in theme-check plugin. How to deal with that? Or should I leave it as it is?
dekciw, this has been discussed here, do not worry about it. So, have u made an automatic array for Google Fonts?
Copy deleted.
Yeah, I’ve made that, already. But I’ve made it my way.
1. Create google-webfonts.php (or name it anything you want).
2. Paste this in http://pastebin.com/wjC2hkMt
3. Include that file in your functions.php
4. Call that function in your options.php file. $google_fonts = get_google_webfonts();
foreach( $google_fonts as $font ) {
$google_webfonts_array[$font['family']]['label'] = $font['family'];
$google_webfonts_array[$font['family']]['value'] = $font['family'];
}
5. Create select setting for your Google Webfont.
array(
'label' => 'Main website font.',
'id' => 'dekciw_main_font',
'type' => 'select',
'desc' => 'Choose a default font for your headings. You can preview all the fonts at <a href="http://www.google.com/webfonts/">http://www.google.com/webfonts/</a>.',
'choices' => $google_webfonts_array,
'std' => 'Homenaje',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'class' => '',
'section' => 'branding'
)
Also, you should merge that array with some default fonts array
And if you would like to use that in typography setting, you should reorganize your array a bit.
Does the optiontree can do this? ( Disable and Enable )

I have a question.
The user can upload pictures in the OT menu for a slider.
In the functions.php I crop images, e.g.:
add_image_size('slider680', 680, 300, true);
With the nhp theme options I just used
<img src="<?php echo ot_get_option( 'sliderimage1' ); ?>" class="slider680" />
to display the image. But with OT the original picture is taken.
Which code do I have to use?
Thank you. Great plugin, btw.
CSS -Code
img.slider680 {
width: 680px;
height: 300px;
}
