WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used a loop to display posts from specific categories, then add the code for WP_Paginate plugin under that loop ... below my posts I see pagination links from 1 --> 5 , however when I press page 2 the page shows older posts but when I press page 3 or 4 or 5 it shows nothing at all ! just empty div . I tried another plugins and all show the same pagination numbers and behavior.

here is the code I used

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        'cat' => 3,4,7,
        'posts_per_page' => 10,
        $temp = $wp_query;
        $wp_query= null;
        $wp_query = new WP_Query($args);

        if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post();

         (CONTENT HERE)       

<?php endwhile; endif;  ?>

<?php }   ?>
<?php if(function_exists('wp_paginate')) { wp_paginate(); } ?>
share|improve this question

When you navigate to page 3-5, does the page shows page not found on the heading of the browser? Is it just a empty div or is it 404 page?

Try to set the number of posts to be shown in reading setting of your admin less than 10 or less then post per page value set in your above code and look if the problem still persists..

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.