Skip to content

Instantly share code, notes, and snippets.

@jdcauley jdcauley/Custom Post Loop
Last active Jan 4, 2016

Embed
What would you like to do?
Custom Post Loop
<div class="row">
<?php query_posts('showposts=4'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-sm-4 recent-entry">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Continued</a>
</div>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.