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 have a plugin that calls the Media Uploader to allow users to add images to a Page. The uploader is being displayed and taking images fine, but it is not attaching them to Page ID 65 as I wish (or showing images attached to that Page as in the Gallery).

Am I missing something, or is this just not possible in WP? Thanks.

jQuery(document).ready(function($){

    $('.manage-images-button a.button-secondary').on('click', function(){

        tb_show('Manage Front Page Images', 'media-upload.php?referer=dd-options&TB_iframe=true&post_id=65', false);
        return false;

    });

});
share|improve this question

1 Answer 1

Bizarrly, the answer to this is to simply swap two of the parameters around -

tb_show('Manage Front Page Images', 'media-upload.php?referer=dd-options&post_id=65&TB_iframe=true', false);
share|improve this answer

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.