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?
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.
I found a solution to show the content of single.php in a fancybox popup.
I removed
get_header
andget_footer
from my single.php but includedwp_head
andwp_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.