WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] pagination problem (2 posts)

  1. kierzniak
    Member
    Posted 3 years ago #

    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/3
    is allways have this same effect, page with first 5 posts.

  2. kierzniak
    Member
    Posted 3 years ago #

    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); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic