Support » Fixing WordPress » Query posts and Post Nav link doesnt work together

  • Resolved a_perfect_oblong


    Hi guys,

    I’ve been stuck with this for quite some time now and havent really found a solution on the web.

    Right now i’m using:
    <?php query_posts(‘category_name=Sub articles&showposts=4’); ?>

    to display posts that belong only to the ‘Sub article’ section and display a max of 4 posts per page.

    at the bottom of the loop, i used <?php posts_nav_link(); ?> so previous and next buttons would appear and the viewers will be able to read other posts in that same category.

    Problem is, when i click on next or previous, the other articles don’t show up and still displays the current 4 posts i have at the beginning. but when i took out the query posts, post nav link actually worked.

    But i definitely need query posts because i’m displaying posts by category so i cant just ignore it.

    Has anyone encountered this and have any solutions for me? thanks, any help would be dearly appreciated. Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Query posts and Post Nav link doesnt work together’ is closed to new replies.