Skip to content

Instantly share code, notes, and snippets.

@mvaneijgen
Last active April 8, 2020 12:26
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 mvaneijgen/3d17e17338106b78be986aa512989f38 to your computer and use it in GitHub Desktop.
Save mvaneijgen/3d17e17338106b78be986aa512989f38 to your computer and use it in GitHub Desktop.
<?php $args = array(
'post_type' => 'post',
'posts_per_page' => -1,
); ?>
<?php $loop = new WP_Query($args); ?>
<?php if ($loop->have_posts()) : ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<?php get_template_part('templates/content', get_post_type()); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment