Created
February 24, 2016 16:29
-
-
Save chrisguitarguy/b63d3c146d5c0c9f69c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = new \WP_Query(array( | |
// ... | |
)); | |
foreach ($query->chunk(4) as $chunk): ?> | |
<div class="row"> | |
<?php while ($chunk->have_posts()): $chunk->the_post(); ?> | |
<div class="col-md-3 col-sm-12"> | |
<?php the_title(); ?> | |
</div> | |
<?php endwhile; ?> | |
</div> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment