Skip to content

Instantly share code, notes, and snippets.

@dospuntocero
Last active May 31, 2019 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dospuntocero/9f0799c866c48a530f89d9fc9008552a to your computer and use it in GitHub Desktop.
Save dospuntocero/9f0799c866c48a530f89d9fc9008552a to your computer and use it in GitHub Desktop.
generic post type loop
<?php
$loop = new WP_Query( array(
'post_type' => 'the post type',
'posts_per_page' => -1
)
);
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<!-- the fields -->
<?php endwhile; wp_reset_query(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment