custom post type loop code example
Example 1: wp loop custom post type
<?php
$loop = new WP_Query(
array(
'post_type' => 'yourposttypehere'
'posts_per_page' => 50
)
);
while ( $loop->have_posts() ) : $loop->the_post();
?>
<div class="col-sm-4">
My column content
</div>
<?php endwhile;
wp_reset_postdata();
?>
Example 2: wp_query custom post type
//WordPress: Query a custom post type
//For example, query all Case Study post types
<?php query_posts('post_type=case_studies'); ?>
Example 3: custom post type query loop wordpress
Custom Post Type Query Loop