• Hi Eveveryone,

    I am running into an issue with a custom build. Client wants to use WP as a CMS, not a problem.

    Client wants to have a static front page, not a problem.

    Client wants to show 3 posts from a specific category on the front page, this is also not a problem. In Settings>Reading i have 3 posts set to display.

    This is the code I am using:

    <?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    query_posts(‘cat=22&paged=’.$paged); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <!— my post here —>

    <?php endwhile; endif; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘< Older’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Younger >’) ?></div>
    </div>

    3 Posts show as they should and the navigation at the bottom shows perfectly, in this case it is “Older”

    the problem is when I click on the link to “page 2” (“older”) the same posts display on page 2 that are on “page 1”

    I have been searching for something that works for over a week now and I havent found anything. Any chance someone out there knows how to fix this. Any help is greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Query Paged Issue’ is closed to new replies.