I have an interactive map powered by Jquery and I want to be able to show a list of post types per region. When you click on the post type title I want a fancybox to open with the post content. For some reason I can't see away to add the fancybox to the permalinks.
My code is as follows:
<li id="midlands"> <?php page_query = new WP_Query('category_name=midlands&post_per_page>=1') while ($page_query->have_posts()): $page_query->the_post();?> <a class="fancybox" href="<?php the_permalink();?>"<?php the_title();?>?><?php the_title();?</a><br/> <?php endwhile: wp_reset_postdata();?></li>
I have tried everything and I can not get it to work. I can get a link without a permalink to display the page content the links on but I not able to pull the content from a post.