Advertisement
rodro1

Custom Post Type on index tamplate

Aug 17th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.         $args = array( 'post_type' => 'slug', 'posts_per_page' => 10 );
  3.         $loop = new WP_Query( $args );
  4.         while ( $loop->have_posts() ) : $loop->the_post();
  5.           the_title();
  6.           echo '<div class="entry-content">';
  7.           the_content();
  8.           the_post_thumbnail();
  9.           echo '</div>';
  10.         endwhile;
  11.         ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement