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 have a general question: is it possible to use the new WordPress 3.5 Media Uploader window for other purposes (i.e., as a modal popup window for content)? I would like to do this and have spent a lot of time trying to figure out if/how to do it but have had NO luck.

I'm basically looking to replace the Thickbox popup as the way my shortcode panel is presented in the admin panel.

Has anyone done this or something similar? Can anyone point me to something that covers this or some variation on the theme?

Many thanks,


share|improve this question
Have you read this? – gmazzap Jul 29 '13 at 15:55
Maybe you want to show what you tried for so many hours... – kaiser Aug 4 '13 at 16:06

You can try the following script:

var MEDIAmedia_library: function() {
     var formfield = null;

     var wireframe;

     $('body').on('click', '#click-event-selector',function(e) {
         if (wireframe) {

         wireframe = wp.media.frames.wireframe = wp.media({
             title: 'Media Library Title',
             button: {
                 text: 'Media Library Button Title'
             multiple: false

         wireframe.on('select', function() {
             attachment = wireframe.state().get('selection').first().toJSON();


#click-event-selector your click event selector

#input-field-selector your input field value to insert selected object properties

You can also wrap this function in any jquery modal

Reference Wordpress 3.5 Media Uploader

share|improve this answer

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.