Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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;
        $args=array(
        'post_type'=>'post',
        'cat' => 3,4,7,
        'posts_per_page' => 10,
        'paged'=>$paged
        );
        $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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.