If i don't supply a paged value (get the first page), it works. But when i try to get the next page by doing paged => 2 it doesn't find anything even though there are plenty of posts to get.

That's the first page showing the first ten posts. It works fine. If you scroll to the bottom and open the "Ladda fler" link in a new tab (otherwise it will ajax it), it doesn't find anything.

At the top of the page you see the arguments i pass to WP_Query, for debugging purposes. As you can see, on page two i also pass paged => 2 which returns nothing.

Is there something more i need to supply? Am i missing something?

  • 1
    How many posts do you have? Isn't it so that you have exactly 10 posts and you're showing them all on first page? Jun 26, 2013 at 9:50

1 Answer 1


Isn't it so that you have exactly 10 posts and you're showing them all on first page.

$found_posts - The total number of posts found matching the current query parameters

found_posts on your first page shows 10. All of these posts are shown on first page. So there are no posts to show on second page - therefore it's empty.

  • I'm not printing out $query->found_posts, i'm printing out count($posts); (also, i lied, i'm using get_posts(), not WP_Query(). But i read your comment above and it turns out you were actually right, there were simply just not enough posts. The thing is, i'm using one taxonomy on two post_types, so when i went into the taxonomy and looked at the post count each term was used in, it showed well above 10 on most terms. ...
    – qwerty
    Jun 26, 2013 at 9:58
  • ... But since i'm using the taxonomy for multiple post types, it didn't count correctly (a lot of the posts were from the other post type). I hope this makes sense. Anyway, include the comment in your answer and i'll mark it as accepted. I've been struggling with this for over an hour, kind of silly it has been working from the beginning. Oh well. Thank you!
    – qwerty
    Jun 26, 2013 at 9:58
  • Answer updated, so you can mark it accepted :) Jun 28, 2013 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.