Skip to content

Instantly share code, notes, and snippets.

@domosedov
Created March 3, 2020 16:13
Show Gist options
  • Save domosedov/0e13aea3560029848938cbbdbffec845 to your computer and use it in GitHub Desktop.
Save domosedov/0e13aea3560029848938cbbdbffec845 to your computer and use it in GitHub Desktop.
custom-post-type-loop
<?php
$loop = new WP_Query( array(
'post_type' => 'Property',
'posts_per_page' => -1
)
);
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<!-- do stuff -->
<?php endwhile; wp_reset_query(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment