Skip to content

Instantly share code, notes, and snippets.

@michaelbonner
Created September 17, 2014 16:03
Show Gist options
  • Save michaelbonner/6d9d1b621cdb87d59448 to your computer and use it in GitHub Desktop.
Save michaelbonner/6d9d1b621cdb87d59448 to your computer and use it in GitHub Desktop.
wp_query loop
// the query
$the_query = new WP_Query( $args );
// the loop
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
// stuff
endwhile; endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment