paging borked when featured post loop and regular loop is on a page (3 posts)

  1. noise
    Posted 4 years ago #

    Googled my brain out - tried everything I could think of - still not joy.

    The site has an index.php (using the "Show your latest posts" option) with a featured story and then the rest underneath.

    The problem is when you click on the "older posts" it just returns the same first page.

    The featured post loop is
    `<?php query_posts('showposts=1'); $ids = array();
    while (have_posts()) : the_post();
    $ids[] = get_the_ID(); ?>`

    The loop under that displays the posts minus the id from the $ids

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    'post__not_in' => $ids,
    while (have_posts()) : the_post(); ?>

    I tried using WP-Paginate and WP-Pagenavi, no better

    Anyone out there know what that what would be causing this?


  2. Michael
    Forum Moderator
    Posted 4 years ago #

    try to add
    before this line:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;


  3. noise
    Posted 4 years ago #

    jeesh ... you know I tried adding the reset_querty in many of the previous attempts at fixing it, just figured that wasn't the issue in this case.

    That did fix it thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic