Skip to content

Instantly share code, notes, and snippets.

@kprimdal
Created November 22, 2012 02:50
Show Gist options
  • Save kprimdal/4129189 to your computer and use it in GitHub Desktop.
Save kprimdal/4129189 to your computer and use it in GitHub Desktop.
WP: Loop
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) : $the_query->the_post();
endwhile;
endif;
wp_reset_postdata();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment