$new_query->query('cat=' . $idcat . '&paged=&post_type=post&posts_per_page=2'); global $counter_blog; $counter_blog = 1; while ($new_query->have_posts()) : $new_query->the_post(); $times = get_post_meta(get_the_ID(), 'timenews', true); $times = strtotime($times); if( $fromdate<=$times && $todate >= $times) { get_template_part( 'content-calendar', get_post_format() ); } $counter_blog++; endwhile; previous_posts_link(); echo "\t\t"; next_posts_link(); Here there is such code, why shows only 3 pages maximum? I can not understand where to change it, and if you display the 1st record on the page, so are 3 pages of everything filled?
------ update ------
Redid the output like this, now the pagination links display the actual number of pages (before that it showed 3), but all are empty after the third ...
query_posts(array('cat'=>$idcat,'posts_per_page'=>1, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ) )); if ( have_posts() ) : while ( have_posts() ) : the_post(); get_template_part( 'content-calendar', get_post_format() ); endwhile; endif; echo paginate_links(); But the first option is better, since there filtering by date normally works, and in the second it is not normal. :)