I would like to show my retrieved content form my classes method in thickbox. How could I do this? I have been adding the proper id to my desired hyperlink but all of the admin body is getting parsed inside of the thickbox.

<a href="?page=blahblah&TB_iframe=true&width=600&height=550" class="thickbox">Click</a>

class myAdmin {

    public function __construct() {


    public function myfunction() {    
        echo '<div class="css_class">The content of my thickbox</div>';    


1 Answer 1


Below, an example of what's needed to use ThickBox.


<a href="#" id="taxonomy_banner_image" class="taxonomy_banner_image"> 
Click Here

<script type="text/javascript">
jQuery(document).ready(function() {   
    jQuery("#taxonomy_banner_image").click(function() {                 
        tb_show("", "filename?TB_iframe=true");
        return false;

tb_show parameters:

  1. title of the box.
  2. url of file and with parameter iframe=true

I think this will give you an idea how to use the ThickBox. If you face any problem, let me know.

  • thank you for your feedback, but still having problem to do not have all the content of admin page wrapped
    – fefe
    Commented Dec 22, 2012 at 11:30
  • 1
    @fefe and Arvind, take a look at this Answer, you need to intercept the thickbox and add iframe_header(), iframe_footer() and exit.
    – brasofilo
    Commented Jan 6, 2013 at 19:38
  • 1
    You can also use the function add_thickbox() as alternative to enqueue the script and style. Is a little bid easier and fast forward.
    – bueltge
    Commented Jan 23, 2013 at 14:24
  • I what to pass dynamic content with parameter, how can i do it?
    – Gino
    Commented Dec 26, 2015 at 5:15
  • Please can you explain in detail which parameters you want to pass?
    – Arvind Pal
    Commented Dec 28, 2015 at 10:08

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.