Skip to content

Instantly share code, notes, and snippets.

@livercake
Last active January 2, 2016 23:39
Show Gist options
  • Save livercake/8378086 to your computer and use it in GitHub Desktop.
Save livercake/8378086 to your computer and use it in GitHub Desktop.
<?php
$newLoop = new WP_Query();
$newLoop->query('showposts=3');
while ($newLoop->have_posts()) : $newLoop->the_post(); ?>
<!-- do stuff here in HTML -->
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment