Forums

query_post problem showing less on second page (3 posts)

  1. Ivanhon
    Member
    Posted 1 year ago #

    Hello I have a query_post problem.

    I try to create a portfolio page. I have created a page where I output one category from my "blogg". On this page I try to output 6 posts on the first page. And then if I have for example 7 posts in this category I would like the output when you click the button "old entries" to just be one post.

    I have used this code before the loop:
    <?php query_posts('cat=3&showposts=6'); ?>

    I understand that I need a if and else statement but I haven“t been able to find anything that fits my need.

    Thanx in advanced!

    //OLA

  2. dfunkydog
    Member
    Posted 1 year ago #

    You'll have to setup your query for pagination. Use this snippet instead.

    Then add posts_nav_link() for navigation.

  3. Ivanhon
    Member
    Posted 1 year ago #

    Thanx dfunkydog it works perfect!

    //OLA

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags