Skip to content

Instantly share code, notes, and snippets.

@eyecandy91
Forked from kevinwhoffman/loop-custom.php
Created June 20, 2019 07:42
Show Gist options
  • Save eyecandy91/ad5b5b67e9f598c94f68b7c12d8281b9 to your computer and use it in GitHub Desktop.
Save eyecandy91/ad5b5b67e9f598c94f68b7c12d8281b9 to your computer and use it in GitHub Desktop.
WordPress - 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