title: How do I create a page template to display a custom post type
body: <p>I am wanting to create a page template file to display posts from a custom content type. actually I have 3 different type of post type 'books', 'author' and news.
  here is my problem these 3 post type have different template and I want to show each of theme in separate pages, first question should I call these post type in a page.php or in single.php? I already know that single.php using for dynamic content and page.php use for static one, what should I create for showing content of these post type?
  here is an example:
  I creat page-author.php file to showing author post type
  here is my code</p>
  
  <pre><code>&lt;?php /* Template Name: author-page-theme */ 
      get_header(); ?&gt;
  &lt;div class="head-style col-md-12 col-sm-12 col-xs-12"&gt;
      &lt;?php while ( have_posts() ) : the_post(); ?&gt;
      &lt;div class="title-pack col-md-12 col-sm-12 col-xs-12"&gt;
          &lt;span class="line visible-sm-block"&gt;&lt;/span&gt;
          &lt;span class="visible-sm-block tittle-style"&gt;&lt;?php the_title(); ?&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="row writer-crit"&gt;
          &lt;div class="writer-crit-box col-md-9 col-sm-8 col-xs-12"&gt;
              &lt;div class="col-md-11 col-sm-11 col-xs-12"&gt;
                  &lt;?php $args = array( 'post_type' =&gt; 'Author', 'posts_per_page' =&gt; 5 ); 
                  $loop = new WP_Query( $args );
                  while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
                      &lt;a class="writer-link col-md-12 col-sm-12 col-xs-12" href="&lt;?php post_permalink(); ?&gt;"&gt;
                          &lt;div class="writer-row1 col-md-12 col-sm-12 col-xs-12"&gt;
                              &lt;div class="col-md-2 col-sm-3 col-xs-12 image-right"&gt;
                                  &lt;?php the_post_thumbnail(array('class' =&gt; 'img-responsive')); ?&gt;
                              &lt;/div&gt;
                              &lt;div class="col-md-10 col-xs-12 col-sm-9 col-xs-12 pull-right writer-content"&gt;
                                  &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
                                  &lt;?php if ( get_field('auth-trans') ) { 
                                      echo '&lt;h4&gt;'.get_field('auth-trans').'&lt;/h4&gt;';} ?&gt;    
                                  &lt;?php if ( get_field('writer-bio') ) { 
                                      echo '&lt;p&gt;'.get_field('writer-bio').'&lt;/p&gt;';} ?&gt;
  
                                  &lt;span&gt;...&lt;/span&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/a&gt;
                  &lt;?php endwhile; // End of the loop. ?&gt;                                              
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;?php endwhile; // End of the loop. ?&gt;
      &lt;/div&gt;  
  &lt;?php get_footer(); ?&gt; 
  </code></pre>
  
  <p>but it doesn't work. it shows just index page template not what I create for this page.
   Any suggestions on how to make this post appear ?
  I completely new to WordPress and this is my first project so I really need help.</p>