php - Page listing post_type pagination not working -


i created page template join posts specific post_type in 1 page, working except pagination. show right number of posts page but, in case, have 8 posts , show 5. did changes without success. ideas?

<?php /* template name: news */ ?>  <?php get_header(); ?>  <!-- begin colleft -->  <div class="container">         <main id="main" class="container" role="main">               <?php                  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                 query_posts(array('paged' => get_query_var('paged'), 'posts_per_page'=>5, 'post_type'=>'our-work', 'order' => 'asc'))             ?>              <br><br><br>              <!--header-->             <div class="page-header">                 <img src="www.wtk.com/img/3428245.png">             </div>               <div class="inform">                 display text here             </div>               <br>              <div>                 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>              <div class="news-title">                 <h3><?php the_title(); ?></a></h3>             </div>              <div class="news-box">                 <?php the_post_thumbnail(); ?>                 <?php the_excerpt(); ?>                 <a href="<?php the_permalink(); ?>">read more →</a>             </div>              <br><br>               <?php endwhile;?>              <?php if (function_exists("emm_paginate")) {                 emm_paginate();             } ?>              <?php wp_reset_postdata(); ?>              <?php else : ?>                 <p><?php _e('not found'); ?></p>             <?php endif; ?>          </div>  </div>  <!-- end colleft -->  <?php get_footer(); ?> 

i can see in code have 'posts_per_page' => 5. explain why seeing 5 posts on page.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -