Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Last active January 4, 2016 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdcauley/8562457 to your computer and use it in GitHub Desktop.
Save jdcauley/8562457 to your computer and use it in GitHub Desktop.
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