Title: [Plugin: OptionTree] Using the Upload type
Last modified: August 20, 2016

---

# [Plugin: OptionTree] Using the Upload type

 *  Resolved [tdschrock](https://wordpress.org/support/users/tdschrock/)
 * (@tdschrock)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-optiontree-using-the-upload-type/)
 * I’m trying to use the Upload type for an image on the front page of my site. 
   I’ve uploaded the file, and clicked on “Add to Option Tree”, but I don’t see 
   any filename in the box, and I cannot figure how to get the picture displayed
   on the page. I’m using the code:
 *     ```
       <?php
                      if ( function_exists( 'get_option_tree') ) {
                        echo get_option_tree( 'lbbc_sermon_series_picture' );
                      } ?>
       ```
   
 *  to display the picture file.
 * [http://wordpress.org/extend/plugins/option-tree/](http://wordpress.org/extend/plugins/option-tree/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [tdschrock](https://wordpress.org/support/users/tdschrock/)
 * (@tdschrock)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-optiontree-using-the-upload-type/#post-2663356)
 * I figured out something here. I was not echoing the right info into the img src
   tag. So my code is now…
 *     ```
       if ( function_exists( 'get_option_tree') ) {
                        echo "<img src=";
                        echo get_option_tree( 'lbbc_sermon_series_picture' );
                        echo " />";
                      } ?>
       ```
   
 * Then, for the uploading problem I figured out that you have to leave the link
   url in place for the file url. I was clicking on “None”.
 *  [Daniel Craig Jallits](https://wordpress.org/support/users/jallits/)
 * (@jallits)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-optiontree-using-the-upload-type/#post-2663630)
 * For anyone else who may come across this. The double quotes need to be escaped
   in the first and last echo statements. So the code would be as follows:
 *     ```
       <?php
       	if ( function_exists( 'get_option_tree') )
       	{
       		echo "<img src=\"";
       		echo get_option_tree( 'lbbc_sermon_series_picture' );
       		echo "\" />";
       	}
       ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: OptionTree] Using the Upload type’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daniel Craig Jallits](https://wordpress.org/support/users/jallits/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-optiontree-using-the-upload-type/#post-2663630)
 * Status: resolved