Skip to content

Instantly share code, notes, and snippets.

@nikibrown
Created July 23, 2012 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nikibrown/3164909 to your computer and use it in GitHub Desktop.
Save nikibrown/3164909 to your computer and use it in GitHub Desktop.
<?php $tombstones = new WP_Query('category_name=tombstones&posts_per_page=-1&order=ASC'); ?>
<?php $counter = 0; ?>
<?php echo '<div class="slide">'; ?>
<?php if( $tombstones->have_posts() ) : while ( $tombstones->have_posts() ) : ?>
<?php $tombstones->the_post(); $counter++; ?>
<?php if ($counter % 3 == 0) echo '</div><div class="slide">'; ?>
<?php the_content(); ?>
<?php endwhile; endif;?>
<?php echo '</div>'; ?>
<?php wp_reset_postdata(); ?>
</div><!-- end slideshow -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment