WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
wp-navi throws error 404 on category-{cat-name}.php (1 post)

  1. rhonz10
    Member
    Posted 1 year ago #

    wp-navi show correct pagination links but throws error 404 when i click on page 2
    below is my code:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php
      $paged = (get_query_var('page')) ? get_query_var('page') : 1;
                $the_query = new WP_Query(array('category_name'=>'national','posts_per_page'=>2, 'paged'=>$paged));
               while ( $the_query->have_posts() ) : $the_query->the_post();
                    ?>
                    <h3><a><?php the_title(); ?></a></h3>
                <?php
                       the_excerpt();
                endwhile;
               if(function_exists('wp_pagenavi')) {
                    wp_pagenavi(array('query' =>$the_query));
                }
                wp_reset_query();
                ?>

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic