WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Page 2 sends me to Index.php (1 post)

  1. Marlfey23
    Member
    Posted 1 year ago #

    I am using page navi on two different queries. The first one works fine, but the second one sends me back to index.php when I try to navigate through the pages.

    Thoughts ?

    <?php
    $this_cat_id = get_query_var('cat');

    $my_query = new WP_Query( array( 'tag_id' => $letter, 'posts_per_page' => 6, 'cat' => $this_cat_id, 'paged' => get_query_var('page')) );

    if (have_posts()) :while ( $my_query->have_posts() ) : $my_query->the_post(); ?>

    <div id="single">
    "><?php the_post_thumbnail('results_thumb'); ?>
    <h2>"><?php the_title();?></h2>

      <li class="sport"><?php the_field('sport'); ?>
      <?php echo "|"; ?><li class="year"> <?php the_field('year'); ?><?php echo "|"; ?><li class="category"> <?php the_field('category'); ?>

    </div>
    <?php endwhile; else: ?>

    <?php endif; ?>

    </div>
    <?php wp_pagenavi( array( 'query' => $my_query ) );
    wp_reset_postdata();
    ?>

    http://wordpress.org/extend/plugins/wp-pagenavi/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic