• Experiencing issue with pagenavi.
    The last page of each of the pagenavi is doubeling the posts. It is displaying the last page twice, if you look at the page below you will see by clicking the next link or page two. We do have page navi installed but the normal wordpress links do the same.

    https://mudwallow.com/category/restaurants-and-shopping/restaurants/

    This is happening on other sites as well Multi user as well as Single. We have tried it with a custom permalink structure as well as with none.

    We are running

    * WordPress 2.8.1
    * Page-Navi 2.50
    * Traveler 1.5

Viewing 1 replies (of 1 total)
  • Thread Starter Justinabes

    (@justinabes)

    Pagenation issue fix
    <p>We were using multiple "query_posts" statements in our archive.php file</p>
    <p>I declared these at the top of the page to get the current category ID</p>
    <p> </p>
    <pre class=”script” function=”syntax.Php”>$this_cat_title = single_cat_title(“”, false); // Get the title of the category
    $this_cat_id = get_cat_ID( $this_cat_title ); // Get the id from the title
    <p>Then i inserted these lines
    </p>
    <pre class=”script” function=”syntax.Php”><?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    $args=array(
    ‘paged’=>$paged,
    ‘posts_per_page’=>8, // How many posts you would like on a page
    ‘cat’=>$this_cat_id // You will only need this if you have multiple loops on one page
    );
    query_posts($args); ?>
    <p> above the start of your loop(s) here</p>
    <pre class=”script” function=”syntax.Php”><?php while (have_posts()) : the_post(); ?>

    <p>
    </p>
    <p>
    </p>

    <p> </p>

Viewing 1 replies (of 1 total)
  • The topic ‘Pagenation issue’ is closed to new replies.