Skip to content

Instantly share code, notes, and snippets.

@landru247
Created April 24, 2013 17:20
Show Gist options
  • Save landru247/5453862 to your computer and use it in GitHub Desktop.
Save landru247/5453862 to your computer and use it in GitHub Desktop.
WordPress: PHP - while loop
<?php $loop = new WP_Query(array( 'post_type' => '{post-name-here}' ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php endwhile; ?>
<?php $loop = new WP_Query(array( 'post_type' => '{post-name-here}' ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment