How to link single post to thickbox in WordPress?

How can I link single.php to open in thickbox?

I know I have to add class="thickbox" to the permalink – but how do I link post content with it?

Read More

I tried creating a hidden div containing the stuff I want the popup to display and then link to the div ID but I didn’t think this through because this method shows a clone of the whole page you’re on just inside the thickbox. Not what I want.

But if you just add class="thickbox" to the permalink which is supposed to bring you to the single post you just get an empty thickbox.

Any suggestions on how to show more detailed post content in thickbox? Help would be very much appreciated.

Related posts

Leave a Reply

1 comment

  1. I found a solution to show the content of single.php in a fancybox popup.

    I removed get_header and get_footer from my single.php but included wp_head and wp_footer in order to load stylesheets and scripts.

    Then I downloaded Easy Fancybox for WordPress and enabled Iframe content.

    The links to my single posts opening in fancybox now look like this:

    <a class="fancybox-iframe" href="<?php the_permalink(); ?>">Open Single Post in Popup</a>

    Just in case anybody’s trying to achieve the same thing.