Hello,
I am using the a custom post type with the jQuery Cycle plugin. Basically, my custom post type is a slideshow and only has images as content. I have the jquery Cycle plugin displaying the custom post type randomly. Everything seems to be working with one minor glitch. When you reload the page, the last post (in the custom post type) is briefly displayed.
The following is my code:
jQuery(document).ready(function() {
// Slideshow
jQuery('#ss').cycle({
fx: 'fade',
speed: 6000,
random: 1
});
});
<div id="slideshow">
<div class="row">
<div id="ss" class="column grid_12">
<?php $query = new WP_Query( 'post_type=slideshow' ); ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php remove_filter ('the_content', 'wpautop'); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
</div>
</div>
</div>