2

this is my code in Custom page Template

<?php query_posts('showposts=8'); ?>    
<?php 
$count = 1;
if (have_posts()) : while (have_posts()) : the_post(); if($count == 1) : ?>

& this is wp_pagenavi code

<div class="more_entries">
<?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?><?php } ?></div>
</div>

page numbers showing but navigation not working

1
  • i have tried all 'paged' solution, but failed. finally this old method works! theodin.co.uk/blog/design/…
    – user15647
    Commented Apr 29, 2012 at 6:14

1 Answer 1

3

Looks like Old Famous Problem with paged

try this for quey_posts();

 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

 query_posts(array(
   'posts_per_page' => 8,
   'paged' => $paged
  )
 );
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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