Posts by ismayanti

3 posts
  • Has been part of the Envato Community for over 1 year
  • Sells items exclusively on Envato Market
ismayanti says

The code from the internet. I change to ot_get_option but it same with before, the background doesn’t change

3 posts
  • Has been part of the Envato Community for over 1 year
  • Sells items exclusively on Envato Market
ismayanti says

The background doesn’t change when I select from Optiontree panel. What the right code to call it?

3 posts
  • Has been part of the Envato Community for over 1 year
  • Sells items exclusively on Envato Market
ismayanti says

Hi all, Im new in PHP, please help me to solve the problem. I want to create multiple background in my theme but have trouble, this is the code :

array( 'id' => 'background-img', 'label' => 'Choose Background', 'std' => 'pattern-0', 'type' => 'radio-image', 'section' => 'styling', 'class' => ' ', 'choices' => array( array( 'value' => 'pattern-0', 'label' => 'Default', 'src' => get_template_directory_uri() . '/functions/images/pattern-0.png' ), array( 'value' => 'pattern-1', 'label' => 'Pattern-1', 'src' => get_template_directory_uri() . '/functions/images/pattern/pattern-1.png' ), array( 'value' => 'pattern-2', 'label' => 'Pattern-2', 'src' => get_template_directory_uri() . '/functions/images/pattern/pattern-2.png' ), array( 'value' => 'pattern-3', 'label' => 'Pattern-3', 'src' => get_template_directory_uri() . '/functions/images/pattern/pattern-3.png' ) ) ),

And Call with this :

if ( of_get_option('background-img') != '' ){ if ( of_get_option('background-img') != '' ) { $styles .= '.background-img { background: url('.get_template_directory_uri().'/functions/images/pattern/pattern-0.png) repeat; }'."\n"; }else if( of_get_option('background-img') != '' ){ $styles .= '.background-img { background: url('.get_template_directory_uri().'/functions/images/pattern/pattern-1.png) repeat; }'."\n"; }else if( of_get_option('background-img') != '' ){ $styles .= '.background-img { background: url('.get_template_directory_uri().'/functions/images/pattern/pattern-2.png) repeat; }'."\n"; }else{ $styles .= '.background-img { background: url('.get_template_directory_uri().'/functions/images/pattern/pattern-3.png) repeat; }'."\n"; } }
by
by
by
by
by
by