• Hi,
    It shows 3 pages when there are only 1 1/2. When you click on page 3, it takes you to blank page without any page navigation.

    The same thing happens with pagenavi plugin.

    Please help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am having the same problem. There are a couple posts on this plugin that shows the same issue. Does anyone have a quick work around for this. I am inclined to use a :last class on the CSS that stops the last <li> from being displayed.
    Here is the code that I am using on the archive.php page. Any help is much appreciated:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Alright I did some tinkering around and apparently the culprit of the problem rests with the posts_per_page condition. Once I changed it to this:

    <div class="c3 ptxxx pbxxx">
    <h1 class="cap cnt shd pbxx">Latest News in Downtown Asheville</h1>
    <?php if (have_posts()) : ?>
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("&cat=30&paged=$paged"); ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php static $count1 = 1; ?>
    <div class="c <?php if($count1%3==0) { echo 'last'; } ?>">

    …. more code below but not relevant

    That shows 10 articles with the pagination being correct. However, thinking that if I just changed the General preferences in dashboard / Reading to 9 blog posts articles … it still stuck with 10. This is decent enough cause at least I am not encountering an error.

    Does anyone know of a thread that can have the tweak:

    1. support an offset (so that the featured story doesn’t repeat)
    doing this, disables the pagination from working
    2. control the posts_per_page count
    doing this, generates an additional page in the pagination that leads to a 404 nowhere page

    Thread Starter jzigbe

    (@jzigbe)

    In my case the problem was simple:
    There was a difference between the “reading settings” number of posts to show and the settings in the “query_posts .. &posts_per_page=”

    Once I made them the same, the problem vanished.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Paginate] Shows 3 pages when there are only 2’ is closed to new replies.