751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

I am having a small issue. I got the option tree put into my theme without issue. Now I am trying to figure out how it works but I can’t seem to get the options out of the database. I tried like so


<?php $options = get_option_tree('option_tree'); ?>

echo $options('test_input'); ?>

when I do that, I get this error Fatal error: Function name must be a string

2566 posts Put a Donk On It
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • United Kingdom
  • Exclusive Author
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 100 and 199 users
+5 more
ThemeProvince says

@cybershot


$sample_option = get_option_tree('sample_setting_id','',false);

echo $sample_option;

751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

I see, I just got it to work this way


$options = get_option('option_tree'); 

echo $options['test_option']; 

which way do you think is better?

2566 posts Put a Donk On It
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • United Kingdom
  • Exclusive Author
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 100 and 199 users
+5 more
ThemeProvince says

If you have a lot of options in a php file use your way.

212 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Portugal
shaki says

This integration is on my to-do list. I remember I tried to call some options (using the plug-in) and got stuck somewhere.

Anyways, thanks guys, really appreciate your input. @OP, Big thank you.

1302 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 more
fuelthemes says

I use optiontree as a framework in my latest theme. I worked hours to get it working properly :)

212 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Portugal
shaki says

I use optiontree as a framework in my latest theme. I worked hours to get it working properly :)

Cool. Easy integration or somewhat difficult to a rookie like myself?

212 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Portugal
shaki says

Definitely I am not able to put this to work, I did manage to edit my admin options, thats all ok, but I can’t put these options to show up in my footer (just an example):

This is my code:

<?php if ( function_exists( ‘get_option_tree’) ) { get_option_tree( ‘test_option’, ’’, true ); } ?>

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘test_heading1’ ); } ?>

As you might noticed, heading1 is a custom text block of mine, created in OptionTree admin zone.

What am I missing?

212 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Portugal
shaki says

Definitely I am not able to put this to work, I did manage to edit my admin options, thats all ok, but I can’t put these options to show up in my footer (just an example):

This is my code:

<?php if ( function_exists( ‘get_option_tree’) ) { get_option_tree( ‘test_option’, ’’, true ); } ?>

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘test_heading1’ ); } ?>

As you might noticed, heading1 is a custom text block of mine, created in OptionTree admin zone.

What am I missing?

Sorry about this new post, but I did manage to get TEXT to show up. This is the code I used:

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘input’ ); } ?>

BUT …

Images do not show up, just a url: http:xxlocalhost/wordpress/wp-content/uploads/2011/03/yahoo-logo1.jpg

Using:

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘upload’ ); } ?>

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says
<?php if ( function_exists( ‘get_option_tree’) ) 
{ 
      $img_upload = get_option_tree( ‘upload’ ); 
} 
?>

<img src="<?php echo $img_upload ?>" />



Definitely I am not able to put this to work, I did manage to edit my admin options, thats all ok, but I can’t put these options to show up in my footer (just an example):

This is my code:

<?php if ( function_exists( ‘get_option_tree’) ) { get_option_tree( ‘test_option’, ’’, true ); } ?>

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘test_heading1’ ); } ?>

As you might noticed, heading1 is a custom text block of mine, created in OptionTree admin zone.

What am I missing?

Sorry about this new post, but I did manage to get TEXT to show up. This is the code I used:

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘input’ ); } ?>

BUT …

Images do not show up, just a url: http:xxlocalhost/wordpress/wp-content/uploads/2011/03/yahoo-logo1.jpg

Using:

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘upload’ ); } ?>
by
by
by
by
by
by