Skip to content

Instantly share code, notes, and snippets.

@ingozoell
Created June 24, 2016 10:04
Show Gist options
  • Save ingozoell/caed4e9383ef6e068f633e3721197779 to your computer and use it in GitHub Desktop.
Save ingozoell/caed4e9383ef6e068f633e3721197779 to your computer and use it in GitHub Desktop.
Wordpress CPT Loop
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment