Title: pagination problem
Last modified: August 19, 2016

---

# pagination problem

 *  Resolved [kierzniak](https://wordpress.org/support/users/kierzniak/)
 * (@kierzniak)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/pagination-problem-9/)
 * Hi, my index-loop.php:
 *     ```
       <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
       <?php query_posts('cat=-8&paged=$paged'); ?>
       <?php if ( $wp_query->max_num_pages > 1 ) : ?>
                <?php wp_pagenavi(); ?>
       <?php endif; ?>
       <?php wp_reset_query(); ?>
       ```
   
 * I have installed wp_pagenavi() plugin and he is display correctly.
    But [http://www.domain.com/page/2](http://www.domain.com/page/2),
   [http://www.domain.com/page/3](http://www.domain.com/page/3) is allways have 
   this same effect, page with first 5 posts.

Viewing 1 replies (of 1 total)

 *  Thread Starter [kierzniak](https://wordpress.org/support/users/kierzniak/)
 * (@kierzniak)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/pagination-problem-9/#post-1695345)
 * Hmm someone have wrong example, i have just change this line:
    `<?php query_posts('
   cat=-8&paged=$paged'); ?>` to `<?php query_posts('cat=-8&paged=' . $paged); ?
   >`

Viewing 1 replies (of 1 total)

The topic ‘pagination problem’ is closed to new replies.

## Tags

 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [kierzniak](https://wordpress.org/support/users/kierzniak/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/pagination-problem-9/#post-1695345)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
