How to show particular category all post in custom single file

Using The Loop with the required arguments should list all the posts.
An Example:

$temp = $wp_query;
     <?php
        $type="post_type";
        $args = array (
        'post_type' => $type,
        'post_status' => 'publish',
        'paged' => $paged,
        'posts_per_page' => 20,
        'ignore_sticky_posts'=> 1
         );
        $temp = $wp_query; // assign ordinal query to temp variable for later use
        $wp_query = null;
        $alt = false;
        $wp_query = new WP_Query($args);
          if ( $wp_query->have_posts() ) :
while ( have_posts() ) : the_post(); 
  {
  the_title();
  }
  end while;
  endif;
 $wp_query = $temp; /* This is a must to make your template work properly

I hope this helps!

Leave a Comment