-1

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".

2 Answers 2

0

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");
2
  • just change the name according to your need, i just forget to change them.
    – Adi
    Commented Jun 27, 2013 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
    Commented Jun 27, 2013 at 9:16
-2

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

1
  • 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. Commented Jul 18, 2013 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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