Custom Postype Query showing only 10 results should show 23 results

You need to add ‘posts_per_page’=>’-1′ to $args, so:

<?php                   
      global $post;
      $i=1;
      $args = array(
         'order' => 'ASC',
         'orderby' => 'post_date',
         'post_status' => 'publish',
         'post_type' => 'pacificheritage',
         'posts_per_page'=>'-1'
      );
  ?>    
  <?php if (have_posts()):?>
            <?php
            $list_of_posts = new WP_Query($args); 
            while ($list_of_posts->have_posts()):$list_of_posts->the_post();
            $meta = get_post_meta( get_the_ID(), '');
            ?>
            <?php echo $post->ID; ?>
            <?php the_title(); ?><br/>
        <?php 
            endwhile;
            wp_reset_query();
            endif; 
        ?>

Leave a Comment