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

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…

895 posts
  • Has sold $1,000+ on Envato Market
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+5 more
infuse01 says

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.

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

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.

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


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, could u then share with community here coz I couldn’t make it work, please?

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

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?

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

dekciw, this has been discussed here, do not worry about it. So, have u made an automatic array for Google Fonts?

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

Copy deleted.

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

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.

170 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Located in Europe
+1 more
Decneo says

Does the optiontree can do this? ( Disable and Enable )

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

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; }

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