Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to get option to change logo within my option theme. I use this code:

    array("name" => "Upload Logo",
    "desc" => "Choose an image",
    "id" => $shortname."_logo_img",
    "type" => "upload",
    "std" => "",
),

when I execute on my theme option page, nothing appear. I change that type to "file" and "image", that's same as before, nothing appear. I don't want to take URL, like when I set the type as "text".

share|improve this question

2 Answers 2

If using image radio buttons, define a directory path here is code. I hope its going work.

$imagepath =  get_template_directory_uri() . '/images/';

    $options = array();

    $options[] = array( "name" => __('Logo', 'prothemeus'),
                        "desc" => __('Upload your logo', 'prothemeus'),
                        "id" => "pt_logo",
                        "type" => "upload");
share|improve this answer
    
just change the name according to your need, i just forget to change them. –  Adi Jun 27 '13 at 8:57
    
I use the switch-case in my form class. I change from text type to file and I add an input button to submit image. The button is appearing but doesn't uppload the file. Here I change my type code: type="<?php echo $value['file']; ?>" any idea? –  raman Jun 27 '13 at 9:16

Check this code out ... works for 1 instance, multiple instances is not working.

http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/#comment-37213

share|improve this answer
    
Answers in the form of "Look here for a solution" are less than ideal. Answers should be self-explanatory, even if linked resources should become unreachable. Linking to additional external resources for further information is a good idea. –  Johannes Pille Jul 18 '13 at 23:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.