display results from a form in theme-settings.php I've been working on a way to upload a background image for months and I finally got it to work. How do I display the URL to the image on page.tpl.php? It's a form called background_file. Here's my code that I'm using:

&lt;?php
function tsaudio_form_system_theme_settings_alter(&amp;$form, $form_state) {
$form['background_file'] = array(
'#type'     =&gt; 'managed_file',
'#title'    =&gt; t('Background'),
'#upload_location' =&gt; file_default_scheme() . '://theme/backgrounds/',
'#default_value' =&gt; theme_get_setting('background_file'), 
'#upload_validators' =&gt; array(
'file_validate_extensions' =&gt; array('gif png jpg jpeg'),
),);
form_load_include($form_state, 'inc', 'system', 'system.admin');}?&gt;
When you upload a file it creates an file ID (fid) that we need to call back, then generate the URL and then insert it.
Place this in your template file.

$fid = theme_get_setting('background_file');
$image_url = file_create_url(file_load($fid)-&gt;uri);
print '&lt;img src="' . $image_url . '"&gt;';


To print it out with an image style such as thumbnail:

$fid = theme_get_setting('background_file');
print '&lt;img src="' . image_style_url('thumbnail', file_load($fid)-&gt;uri) . '"&gt;';


Not tested.