WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom query only displays 4 posts - rest is 404 (3 posts)

  1. Psylicium
    Member
    Posted 4 years ago #

    Hi all. I have been struggling with this custom query all day, but haven't figured it out yet:

    At the moment I have 11 posts in the database, and I'm using this query to display 2 posts per page:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    <?php query_posts('posts_per_page=2&cat=1&paged=' . $paged); ?>

    For some reason, only the first two pages (containg the four latest posts) is working - page 3 to 6 gives a 404 error. I have searched the forums and noticed that a lot of other people have had the same problems. I have tried almost every suggestion that has been posted, but nothing works for me. The weird thing is that I to begin with copy/pasted a query that's working perfectly on another site I made. But I simply can't get it to work on this site. Could it be a PHP or Apache issue? I am hosting the site in question on my own server, but may have misconfigured something...

    Try it out at http://89.150.187.166/stilstand.dk/htdocs/nyheder - but please ignore the weird colors etc :)

  2. Psylicium
    Member
    Posted 4 years ago #

    Bump! Anyone?

  3. Psylicium
    Member
    Posted 4 years ago #

    Okay, this doesn't make any sense at all. In the Reading Settings, I changed "Blog pages show at most" to 1 post instead of the default 10, and it seems to work now. I guess this is resolved then...

Topic Closed

This topic has been closed to new replies.

About this Topic