WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.


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


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.