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 am writing a plugin that depends on modal dialogs for screen space.

Right now I am using jQuery to create the dialogs, but I want a way that integrates better into the admin theme.

Obviously WP has to have some sort of native dialog system (it's used for uploads). How do I access it?

share|improve this question
up vote 3 down vote accepted

The WordPress admin area uses Thickbox, which is still a jQuery plugin (jQuery is used all over the admin area). You need to enqueue the script and style (add_thickbox() does this for you), and then all links that have class thickbox will be converted. You need to add some URL parameters too, for example the image upload link looks like this: media-upload.php?post_id=735&type=image&TB_iframe=1&width=640&height=285. post_id and type are WordPress-specific, but TB_iframe, width and height are needed for Thickbox, and you should use them in your own links too.

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.