wrapping fancybox around php code? Example: the_content();?
-
I’ve been looking at the support threads here and a lot of them relate to users wanting to display their posts or more specifically their post contents in the fancybox.
Would it be possible to wrap fancybox divs around php code?
<div class="fancybox"> <?php the_title(); ?> <br /> <?php the_content(); ?> </div>
Would something like this be possible? Maybe the title of the post could be a permalink to the post which opens a fancybox with the following code
<?php the_title(); ?> <br /> <?php the_content(); ?>
I’ve also tried a custom template for a custom post type like single-books.php
I then only pasted the above code in it
<?php the_title(); ?> <br /> <?php the_content(); ?>
Assuming that the header/footer and other aesthetic elements wouldn’t be called when I use the traditional way of adding the iframe class to the permalink of the post. However, it didn’t help since it still brought up the whole website in the iframe essentially.
Anyway to work around this?
- The topic ‘wrapping fancybox around php code? Example: the_content();?’ is closed to new replies.