I got a tricky question. I have created a custom post type whose posts I would like to display in a scrolling carousel. The carousel will only display the title, the excerpt and a "read more" button. The "read more" button displays the full post in a FancyBox.
Here is my code so far:
<ul id="slider2">
<?php
$args = array( 'post_type' => 'jobs', 'posts_per_page' => 15 , 'order' => 'ASC' );
$loop = new WP_Query( $args ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li>
<h4><?php the_title(); ?></h4>
<?php echo excerpt( '30' ); ?>
<a class="various1" href="#inline1" title="Lorem ipsum dolor sit amet">Read more →</a>
<div style="display: none;">
<div id="inline1" style="width:400px;height:100px;overflow:auto;"><?php the_content(); ?></div>
</div>
</li>
<?php endwhile; wp_reset_query(); ?>
</ul>
Everything is working nicely. The Carousel and FancyBox scripts are loading correctly but the FancyBox is displaying the wrong content.
Any help/advice would be great.