Skip to content

Instantly share code, notes, and snippets.

@jshcrowthe
Created March 11, 2014 14:53
Show Gist options
  • Save jshcrowthe/9487417 to your computer and use it in GitHub Desktop.
Save jshcrowthe/9487417 to your computer and use it in GitHub Desktop.
Wordpress Custom Post Type Loop
<?php $loop = new WP_Query( array( 'post_type' => 'custom_post_type_name', 'posts_per_page' => 100 ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php the_post_thumbnail(); ?>
<h3><?php the_title() ?></h3>
<a href="<?php the_permalink() ?>">Read More</a>
<?php endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment